function ViewList (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=950,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/laptops.php?category="+sid,'product',win);
}


function CheckList(sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=950,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/viewdesktoplist.php?category="+sid,'product',win);
}



function ViewDetail (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=720,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/details.php?product="+sid ,'product',win);
}

function ViewbDetail (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=720,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/bdetails.php?product="+sid,'product',win);
}
function ViewProducts (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=720,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/detail.php?product="+sid,'product',win);
}



function ViewDetails (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=720,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/desktopdetails.php?product="+sid,'product',win);
}




function SellLaptop (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=560,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/sell-your-laptop.php?title="+sid,'company',win);
}

function Join4Draw (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=460,height=420,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/join4draw.php?title="+sid,'company',win);
}



function TellaFriend (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=610,height=400,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("tellafriend.php?title="+sid,'company',win);
}



function launchpicture (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=560,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/viewpicture.php?pro_title="+sid,'company',win);
}


function launchpicturepro (sid)
{
var left = (screen.width/2) - 320/2;
var top = (screen.height/2) - 500/2;
var win = "width=560,height=800,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("pages/viewproducts.php?pro_title="+sid,'product',win);
}






function sendmessege (txtrcpntemail)
{
var left = (screen.width/2) - 280/2;
var top = (screen.height/2) - 500/2;
var win = "width=400,height=450,left=" + left + ",top=" + top + ",copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=Yes,status=no,rightclick=no";
window.open("userpannel/sendmessege.php?txtrcpntemail="+txtrcpntemail,'Messege',win);
}



/*function to check email*/

function isEmail(s) 
	{
		//alert("jScript Alert!"+s);
		
		var atIndex = s.indexOf('@');
		var dotIndex = s.indexOf('.', atIndex);
		theSub = s.substring(0, dotIndex+1)
		if ((atIndex < 1)||(atIndex != s.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(s.length <= theSub.length)) 
		{	
			return(false); 
		}
		return(true); 
	}
	
	/* function to check phone number*/
	
	function isPhone (s)
	{
		var cnt = 0;
		var digits = "0123456789,-";
		while ((!false) && (cnt < s.length))
		{
			ch = s.charAt(cnt++);
			if (!(digits.indexOf(ch) > -1))
			{
				return (false);
			}
		}

		return (true);	
	}
	
	
