// JavaScript Document
function chkLogin() {
	with (window.document.lgnfrm) {
		if (isEmpty(login, 'Enter Login')) {
			return false;
		} else if (isEmpty(password, 'Enter Password')) {
			return false;
		} else {
			chksum.value = 'chkin';
		}
	}
}

function chkSearch(frm){
	if(frm.srcNews.value == ""){
		alert("Please Enter Search String");
		frm.srcNews.focus();
		return false;
	}
	return true;
}

function chkHSearch(frm){
	if(frm.srcNews.value == ""){
		alert("Please Enter Search String");
		frm.srcNews.focus();
		return false;
	}
	if(frm.sitesearch[0].checked){
		var frm1 = document.getElementById('frmweb');
		frm1.q.value = frm.srcNews.value;
		frm1.submit();		
		return false;
	}
	return true;
}



function chkHoroscope() {
	with (window.document.frmadd) {
		if(isEmpty(hor_date, 'Enter Date')) return false;
		else if(isEmpty(aries, 'Enter Horoscope for Aries')) return false;
		else if(isEmpty(taurus, 'Enter Horoscope for Taurus')) return false;
		else if(isEmpty(gemini, 'Enter Horoscope for Gemini')) return false;
		else if(isEmpty(cancer, 'Enter Horoscope for Cancer')) return false;
		else if(isEmpty(leo, 'Enter Horoscope for Leo')) return false;
		else if(isEmpty(virgo, 'Enter Horoscope for Virgo')) return false;
		else if(isEmpty(libra, 'Enter Horoscope for Libra')) return false;
		else if(isEmpty(scorpio, 'Enter Horoscope for Scorpio')) return false;
		else if(isEmpty(sagittarius, 'Enter Horoscope for Sagittarius')) return false;
		else if(isEmpty(capricorn, 'Enter Horoscope for Capricorn')) return false;
		else if(isEmpty(aquarius, 'Enter Horoscope for Aquarius')) return false;
		else if(isEmpty(pisces, 'Enter Horoscope for Pisces')) return false;
		chksum.value = 'chkin';		
	}
}

function chkWeather() {
	with (window.document.frmadd) {
		if(isEmpty(weather_date, 'Enter Date')) return false;
		else if(isEmpty(weather_location, 'Enter Weather Location')) return false;
		else if(isEmpty(weather_min, 'Enter Minimum Temperature')) return false;
		else if(isEmpty(weather_max, 'Enter Maximum Temperature')) return false;
		else if(isEmptyLbox(weather_type, 'Enter Weather Type')) return false;
		chksum.value = 'chkin';		
	}
}

function chkAudio() {
	with (window.document.frmadd) {
		if (isEmpty(audio_title, 'Enter Audio Title')) {
			return false;
		} 	
		chksum.value = 'chkin';		
	}
}
function chkAudioCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter Audio Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}

function chkPollsubmit(a){
	for (var i=0; i < a.polloption.length; i++){
		if (a.polloption[i].checked){
			var rad_val = a.polloption[i].value;
		}
	}
	if(!rad_val){
		alert("Please select an option");
		return false;
	}
	return true;
}


function chkPolls() {
	var tot =0;
	with (window.document.frmadd) {
		if (isEmpty(poll_title, 'Enter Poll Title')) {
			return false;
		}else if (isEmpty(ans1, 'Enter First Answer')) {
			return false;
		}else if (isEmpty(ans2, 'Enter Second Answer')) {
			return false;
		}else if (isEmpty(ans3, 'Enter Third Answer')) {
			return false;
		}
		chksum.value = 'chkin';		
	}
}
function chkGallery() {
	with (window.document.frmadd) {
		if (cat_id.value == 0 || cat_id.value == "") {
			alert('Select Category');
			cat_id.focus();
			return false;
		}else if (isEmpty(photo_title, 'Enter Gallery Title')) {
			return false;
		} 	
		chksum.value = 'chkin';		
	}
}
function chkHomeBanner() {
	with (window.document.frmadd) {
		if (isEmpty(banner_title, 'Enter Banner Title')) {
			return false;
		}else if (isEmpty(banner_link, 'Enter Banner Link')) {
				return false;
		}	

		chksum.value = 'chkin';		
	}
}
function chkBanner() {
	with (window.document.frmadd) {
		if (isEmpty(banner_name, 'Enter Banner Name')) {
			return false;
		}else if (banner_type.value == 0 || banner_type.value == "") {
			alert('Select Banner Type');
			banner_type.focus();
			return false;
		}
		
		if(banner_type.value == "direct"){
			if(bimg[0].checked){
				if (isEmpty(banner_image, 'Enter Banner Image URL')) {
					return false;
				}	
			}
			if(bimg[1].checked){
				if (banner_fimage.value == "") {
					alert('Select Banner to Upload');
					banner_fimage.focus();
					return false;
				}
			}
			if (isEmpty(banner_link, 'Enter Banner Link')) {
				return false;
			}	
		}

		if(banner_type.value == "thirdparty"){
			if (isEmpty(banner_code, 'Enter Banner Code')) {
				return false;
			}	
		}

		chksum.value = 'chkin';		
	}
}

function chkDownloads() {
	with (window.document.frmadd) {
		if (cat_id.value == 0 || cat_id.value == "") {
			alert('Select Category');
			cat_id.focus();
			return false;
		}else if (isEmpty(downloads_title, 'Enter Downloads Title')) {
			return false;
		} 	
		chksum.value = 'chkin';		
	}
}
function chkVideo() {
	with (window.document.frmadd) {
		if (video_path.value == "") {
			alert('Select Video Path');
			video_path.focus();
			return false;
		}else if (thumb_path.value == "") {
			alert('Select Thumb Path');
			thumb_path.focus();
			return false;
		}else if (isEmpty(duration, 'Enter Video Duration')) {
			return false;
		}else if (isEmpty(video_title, 'Enter Video Title')) {
			return false;
		} else if (isEmpty(video_desc, 'Enter Video Description')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkVideoEdit() {
	with (window.document.frmadd) {
		if (isEmpty(duration, 'Enter Video Duration')) {
			return false;
		}else if (isEmpty(video_title, 'Enter Video Title')) {
			return false;
		} else if (isEmpty(video_desc, 'Enter Video Description')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}

function chkNews() {
	with (window.document.frmadd) {
		if (cat_id.value == 0 || cat_id.value == "") {
			alert('Select Category');
			cat_id.focus();
			return false;
		}else if (isEmpty(news_title, 'Enter News Title')) {
			return false;
		} else if (isEmpty(news_desc, 'Enter News Description')) {
			return false;
		}
		if(trim(video_path.value) != ""){
			if (isEmpty(photo_name, 'Enter Phot Path')) {
				return false;
			}
		}
		chksum.value = 'chkin';
	}
}
function chkBlogs() {
	with (window.document.frmadd) {
		if (cat_id.value == 0 || cat_id.value == "") {
			alert('Select Category');
			cat_id.focus();
			return false;
		}else if (isEmpty(blogs_title, 'Enter Blogs Title')) {
			return false;
		}else if (isEmpty(posted_by, 'Enter Posted BY')) {
			return false;
		} else if (isEmpty(blogs_desc, 'Enter Blogs Description')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkReviews() {
	with (window.document.frmadd) {
		if (cat_id.value == 0 || cat_id.value == "") {
			alert('Select Category');
			cat_id.focus();
			return false;
		}else if (isEmpty(reviews_title, 'Enter Reviews Title')) {
			return false;
		} else if (isEmpty(reviews_desc, 'Enter Reviews Description')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkVidCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter Video Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}

function chkDlCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter Downloads Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkGalCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter Gallery Category')) {
			return false;
		}else if (isEmptyLbox(parent_id, 'Select Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkNewsCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter News Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkReviewsCategory() {
	with (window.document.frmadd) {
		if (isEmpty(cat_title, 'Enter Review Category')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkArticles() {
	with (window.document.frmadd) {
		if (isEmpty(title, 'Enter Title')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkMenu() {
	with (window.document.frmadd) {
		if (isEmpty(menu_title, 'Enter Menu Title')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkFooter() {
	with (window.document.frmadd) {
		if (isEmpty(footer_title, 'Enter Footer Title')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}
function chkHeader() {
	with (window.document.frmadd) {
		if (isEmpty(header_title, 'Enter Header Title')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}


function chkMenuCat() {
	with (window.document.frmadd) {
		if (isEmpty(cat_name, 'Enter Category Name')) {
			return false;
		} else if (isEmpty(cat_url, 'Enter Category Url')) {
			return false;
		}		chksum.value = 'chkin';
	}
}
function chkSchedules() {
	with (window.document.frmadd) {
		if (isEmpty(schedules_title, 'Enter Schedules Title')) {
			return false;
		} else if (isEmpty(schedules_distributor, 'Enter Schedules Distributor')) {
			return false;
		}		
		chksum.value = 'chkin';
	}
}

function chkMenuSubCat1() {
	with (window.document.frmadd) {
		if (cat_id.selectedIndex == 0) {
			alert('Select Category');
			cat_id.focus();
			return false;
		} else if (isEmpty(subcat1_name, 'Enter Sub Category 1 Name')) {
			return false;
		} else if (isEmpty(subcat1_url, 'Enter Sub Category 1 Url')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkMenuSubCat2() {
	with (window.document.frmadd) {
		if (cat_id.selectedIndex == 0) {
			alert('Select Category');
			cat_id.focus();
			return false;
		} else if (subcat1_id.selectedIndex == 0) {
			alert('Select Sub Category');
			subcat1_id.focus();
			return false;
		} else if (isEmpty(subcat2_name, 'Enter Sub Category 2 Name')) {
			return false;
		} else if (isEmpty(subcat2_url, 'Enter Sub Category 2 Url')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkNewsCat() {
	with (window.document.frmadd) {
		if (isEmpty(cat_name, 'Enter Category Name')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkNewsSubCat1() {
	with (window.document.frmadd) {
		if (cat_id.selectedIndex == 0) {
			alert('Select Category');
			cat_id.focus();
			return false;
		} else if (isEmpty(subcat1_name, 'Enter Sub Category 1 Name')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}
function chkNewsSubCat2() {
	with (window.document.frmadd) {
		if (cat_id.selectedIndex == 0) {
			alert('Select Category');
			cat_id.focus();
			return false;
		} else if (subcat1_id.selectedIndex == 0) {
			alert('Select Sub Category');
			subcat1_id.focus();
			return false;
		} else if (isEmpty(subcat2_name, 'Enter Sub Category 2 Name')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}

function chkVidCat() {
	with (window.document.frmadd) {
		if (isEmpty(cat_name, 'Enter Category Name')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}

function chkVidSubCat() {
	with (window.document.frmadd) {
		if (cat_id.selectedIndex == 0) {
			alert('Select Category');
			cat_id.focus();
			return false;
		} else if (isEmpty(subcat_name, 'Enter Sub Category Name')) {
			return false;
		}
		chksum.value = 'chkin';
	}
}


