
function Eventdetails(event_id, e)
	{

 	start = new Date(); 
 	start = start.getTime();
	
	 try
		{
		if (e.pageX || e.pageY) {var y = (e.pageY) + "px";} 
		else if (e.clientX || e.clientY) { var y = (e.clientY) + "px";} 
		}
	catch(err)
		{
		var y = e.clientY + document.documentElement.scrollTop;
		}
		
	y = y.replace(/px/,'');
	var obj = document.getElementById('EventDiv');
	obj.innerHTML = '';
	
	start = new Date(); 
	start = start.getTime();
	
	var exec = function(str)
	{
		obj.innerHTML = str;
	}
	
	var ajax = new doAjax();
	ajax.doGet('includes/ajax.event_detail.php?id='+event_id+'&start='+start, exec);
	
	}

function Newsdetails(news_id, e)
	{

 	start = new Date(); 
 	start = start.getTime();
	
	 try
		{
		if (e.pageX || e.pageY) {var y = (e.pageY) + "px";} 
		else if (e.clientX || e.clientY) { var y = (e.clientY) + "px";} 
		}
	catch(err)
		{
		var y = e.clientY + document.documentElement.scrollTop;
		}
		
	y = y.replace(/px/,'');
	var obj = document.getElementById('NewsDiv');
	obj.innerHTML = '';
	
	start = new Date(); 
	start = start.getTime();
	
	var exec = function(str)
	{
		obj.innerHTML = str;
	}
	
	var ajax = new doAjax();
	ajax.doGet('includes/ajax.news_detail.php?id='+news_id+'&start='+start, exec);
	
	}
	
// Open popup window start // 
function openWin(url) {
	var w_left = Math.ceil(screen.width/2-300);
	var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=no,menubar=no,height=470,width=710,resizable=yes,toolbar=no,location=no,status=no"); 
	openWin.focus();
}

// Open popup window start //
function openWinBig(url) {
	var w_left = Math.ceil(screen.width/2-300);
	var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=no,menubar=no,height=570,width=510,resizable=yes,toolbar=no,location=no,status=no"); 
	openWin.focus();
}

function openPopWin(url) {
	var w_left = Math.ceil(screen.width/2-300);
	var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=yes,menubar=no,height=300,width=700,resizable=yes,toolbar=no,location=no,status=no"); 
	openWin.focus();
}

function openPopFoot(url) {
	var w_left = Math.ceil(screen.width/2-300);
	var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=yes,menubar=no,height=850,width=700,resizable=yes,toolbar=no,location=no,status=no"); 
	openWin.focus();
}
// Open popup window end //

// *** script for complex entries ***
function validuploadimage()
  {
    if (document.frmimg.file.value=="")
	{
	 alert("Please select Image to upload...");
	 document.frmimg.file.focus();
	 return false;
	}
	else
	 return true;
  }
 
//check uploaded image is .jpg format
 function checkimagetype(ext) {
  if(!ext) return true;
  ext = ext.substring(ext.length-3,ext.length);
  ext = ext.toLowerCase();
  if((ext != 'jpg') && (ext != 'peg') && (ext != 'gif') && (ext != 'png')) {
  alert("Please select a .gif, .png, .jpg, or .jpeg file only");
  document.frmimg.file.focus();
    return false; }
  else
    return true;
}
function checkfiletype(ext) {
  if(!ext) return true;
  ext = ext.substring(ext.length-3,ext.length);
  ext = ext.toLowerCase();
  if(ext != 'pdf') {
  alert("Please select pdf file only ");
  document.frmpdf.file.focus();
    return false; }
  else
    return true;
}

function deleterequesthome(xid,page)
	{
		//alert(xid+page);
	var chk
	chk = confirm("Are you sure to delete?");
	if(chk==true)
	{
	window.location="home.php?paction="+page+"&xId="+xid;
	}
	else
	{
	return false;
	}
	}
	
function deleterequestslide(xid)
	{
		//alert(xid+page);
	var chk
	chk = confirm("Are you sure to delete?");
	if(chk==true)
	{
	window.location="slide.php?xId="+xid;
	}
	else
	{
	return false;
	}
	}

function teamAction(elem, id)
	{
	var action1 = elem.options[elem.selectedIndex].value;
	elem.parentNode.innerHTML="Page Changing...";
	window.location= 'home.php?paction='+action1;
	}