function toggle_menu(id){
	if(document.getElementById('OpenedMenu' + id).style.display == 'none'){
			document.getElementById('NavMenu' + id).className = 'AdminNavActive';
			document.getElementById('OpenedMenu' + id).style.display = 'block';
		}else {
			document.getElementById('NavMenu' + id).className = 'AdminNav';
			document.getElementById('OpenedMenu' + id).style.display = 'none';
			}
}
	
function admin_view_video(pars,videoid,height,width)
{		
		//alert(videoid);
		var adminviewvidep;
		adminviewvidep = "http://"+pars+"/admin/videos/view_video.php?videoid="+videoid;
		window.open (adminviewvidep, "adminvideowindow", "resizable=1,location=0,status=0,scrollbars=1,width="+width+",height="+height);
		
}	

function checkviewcsvalert()
{
	var result =confirm("Are you sure you want to export CSV for view only?");
	return result;
}

function checkmasscsvalert()
{
	var result =confirm("Are you sure you want to export CSV for mass payment?");
	return result;
}
function checkaffiliate()
{
	document.aff_search.search_type.value = 'affiliate';
	document.aff_search.submit();
}
function checkreferee()
{
	document.aff_search.search_type.value = 'referee';
	document.aff_search.submit();
}	

function delete_shove()
{
	var result =confirm("Are you sure you want to delete shove?");
	return result;
}
function admin_view_image(pars,video_id,height,width)
{		
		//alert(videoid);
		var videoimageprev;
		videoimageprev = "http://"+pars+"/admin/videos/image_show.php?video_id="+video_id;
		window.open (videoimageprev, "videoimagewindow", "resizable=1,location=0,status=1,scrollbars=1,width=500px,height=500px");
		
}	
	
function check_url()
{
	// document.getElementById('checkurl' ).style.display='block';
	document.getElementById("url1").innerHTML='<input type="text" name="url" value="http://{site_url}/" id="url">';
}
function uncheck_url()
{
document.getElementById("url1").innerHTML='<input type="text" name="url" value="" id="url">';

}
function admin_view_shove_desc(pars,shove_id,height,width)
{		
		var shovesdescprev;
		shovesdescprev = "http://"+pars+"/admin/shove/shoves_desc.php?shove_id="+shove_id;
		window.open (shovesdescprev, "shovesdescwindow", "resizable=1,location=0,status=1,scrollbars=1,width=400px,height=400px");
}	
function admin_view_article_preview(pars,article_id,height,width)
{		
		var articlepreview;
		articlepreview = "http://"+pars+"/admin/articles/article_preview.php?article_id="+article_id;
		window.open (articlepreview, "articlepreviewwindow", "resizable=1,location=0,status=1,scrollbars=1,width=794px,height=400px");
}	
function admin_view_referral_preview(pars,referral_id,mode)
{		
		var referralpreview;
		referralpreview = "http://"+pars+"/admin/referrals/add_referral_note.php?referral_id="+referral_id+"&mode="+mode;
		window.open (referralpreview, "referralpreviewwindow", "resizable=1,location=0,status=1,scrollbars=1,width=400px,height=230px");
}	
function admin_view_referral_preview_tfpt(pars,referral_id,mode)
{		
		var referralpreview;
		referralpreview = "http://"+pars+"/admin/referrals/tfpt_referral_note.php?referral_id="+referral_id+"&mode="+mode;
		window.open (referralpreview, "referralpreviewwindow", "resizable=1,location=0,status=1,scrollbars=1,width=400px,height=230px");
}	

function admin_view_affiliate_note(pars,affiliate_id,mode)
{		
		var affiliatepreview;
		affiliatepreview = "http://"+pars+"/admin/referrals/add_affiliate_note.php?affiliate_id="+affiliate_id+"&mode="+mode;
		window.open (affiliatepreview, "affiliatepreviewwindow", "resizable=1,location=0,status=1,scrollbars=1,width=400px,height=230px");
}
function admin_view_affiliate_details(pars,affiliate_id)
{		
		var affiliateuserpreview;
		affiliateuserpreview = "http://"+pars+"/admin/referrals/view_affiliate_user_details.php?affiliate_id="+affiliate_id;
		window.open (affiliateuserpreview, "affiliateuserpreviewwindow", "resizable=1,location=0,status=1,scrollbars=1,width=600px,height=430px");
}	
	
	
	
