<!-- Begin POP-UP SIZES AND OPTIONS CODE


// ONLY USE lowercase FOR ALL OPTIONS


// CHANGE ANY OF THESE VARIABLES TO "no" OR "yes" TO TURN AN OPTION OFF OR ON


var close_button 	= "yes"		// GALLERY CLOSE BUTTON ON/OFF
right_click_on		= "no"		// RIGHT CLICK PROTECTION ON


// OTHER OPTIONS YOU CAN CHANGE


border_color		= "FFFFFF"	// PICTURE OUTLINE COLOR
var background_colors	= "06334b" //"292929"	// BACKROUND COLOR OF THE GALLERY POPUP

var view_width 		= 650		// GALLERY POPUP WIDTH
var view_height 	= 550		// GALLERY POPUP HEIGHT

var FAQ_width 		= 600		// FAQ POPUP HEIGHT
var FAQ_height 		= 450		// FAQ POPUP HEIGHT

var scrollbarS 		= "1"		// TURN ON POPUP SCROLLBARS "1" FOR ON "0" FOR OFF
var faqscrollbarS 	= "0"		// TURN ON FAQ SCROLLBARS "1" FOR ON "0" FOR OFF




// COPYRIGHT 2004 © Allwebco Design Corporation
// Unauthorized use or sale of this script is strictly prohibited by law

// YOU DO NOT NEED TO EDIT BELOW THIS LINE

// START POPUP CODE




function popUpFAQOriginal(URL) {
var look='toolbar=0,scrollbars=' + scrollbarS + ',location=0,statusbar=0,menubar=0,resizable=1,width='+view_width+',height='+view_height+',left='+((screen.width-view_width)/2)+',top='+((screen.height-view_height)/2)+','; 
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<html><head><title>Close Up</title>')
popwin.document.write('<link rel=StyleSheet href="corporatestyle.css" type="text/css" media="screen">')
   if (right_click_on == "yes") {
popwin.document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">')
popwin.document.write('<script language="JavaScript">')
popwin.document.write('function noRightClick() {')
popwin.document.write('if (event.button==2) {')
popwin.document.write('alert(\'You may not right mouse click this page.\')')
popwin.document.write('}')
popwin.document.write('}')
popwin.document.write('document.onmousedown=noRightClick')
popwin.document.write('</script>')
}
popwin.document.write('</head>')
popwin.document.write('<body bgcolor="#'+background_colors+'" leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginheight=0 marginwidth=0>')
popwin.document.write('<TABLE cellpadding=0 cellspacing=0 border=0 width="100%" height="100%" ><tr><td align="center">')
popwin.document.write('<br>')
popwin.document.write('<TABLE cellpadding="0" cellspacing="0" border="1" bordercolor="#' + border_color + '" style="border-collapse:collapse"><tr><td>')
popwin.document.write('<img src="'+URL+'">')
popwin.document.write('</td></tr></table>')
   if (close_button == "yes") {
popwin.document.write('</td></tr><tr><td valign="bottom" align="center">')
popwin.document.write('<br><form style="margin: 0px"><input type="button" value="Close" onClick=\'self.close()\' onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" class="button-popups"></form>')
}
popwin.document.write('</td></tr></table>')
popwin.document.write('</body>')
popwin.document.close()
}


function popUpFAQ(URL) {
day = new Date();
id = day.getTime();
faqscrollbarS ='yes';
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=' + faqscrollbarS + ',location=0,statusbar=0,menubar=0,resizable=1,width='+FAQ_width+',height='+FAQ_height+' ,left='+((screen.width-FAQ_width)/2)+',top='+((screen.height-FAQ_height)/2)+','+'');");
}



function popUpFAQAD(URL) {
day = new Date();
id = day.getTime();
faqscrollbarS ='yes';
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=' + faqscrollbarS + ',location=0,statusbar=0,menubar=0,resizable=1,width='+FAQ_width/2.9+',height='+FAQ_height/1.9+' ,left='+((screen.width-FAQ_width/2.9)/2)+',top='+((screen.height-FAQ_height/1.9)/2)+','+'');");
}

var new_img_id	= 1;
function add_img_photo() {
 	if(new_img_id < 5 ) {
		document.getElementById('file_upload_img'+new_img_id).innerHTML='<input type="file" name="inputfiles[]" class="form" style="width: 350px;" size="45" onchange="add_img_photo()">';
		new_img_id++;
	}
}

// Credit goes to user kenny9336 on http://www.experts-exchange.com
function iFrameHeight() 
{
	//alert('asas');
	if(document.getElementById && !(document.all)) 
	{
		var h = document.getElementById('blockrandom').contentDocument.body.scrollHeight;
		document.getElementById('blockrandom').style.height = h;
	}
	else if(document.all) 
	{
		h = document.frames('blockrandom').document.body.scrollHeight;
		document.all.blockrandom.style.height = h;
	}
}

//  End -->




/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */

x = 20;
y = 70;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
	obj = document.getElementById(obj); alert(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
}
//window.onscroll = setTimeout("placeIt('layer1')",500);


var POST_width 		= 800			// FAQ POPUP HEIGHT
var POST_height 	= 600		// FAQ POPUP HEIGHT

function popUpPOSTOriginal(URL) 
{
	day = new Date();
	id = day.getTime();
	faqscrollbarS ='yes';
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=' + faqscrollbarS + ',location=0,statusbar=0,menubar=0,resizable=1,width='+POST_width+',height='+POST_height+',left='+((screen.width-POST_width)/2))+',top='+((screen.height-POST_height)/2);");
}


	function ModalPopupsCustom1() {

			//alert(navigator.userAgent.toLowerCase());
			if (navigator.userAgent.toLowerCase().indexOf('msie') !=-1)
			{
				// if ie then continue 
			}
			else if (navigator.userAgent.toLowerCase().indexOf('firefox') !=-1)
			{
				// if firefox then continue 	
			}
			else
			{
				return;
			}


			// if URL has eid the do not show the popup
			if(window.location.href.indexOf("eid") != -1 ) {
				return;
			}	
			// if cookie is set on the client pc the do not show the popup
			c_value = getCookie('modalpopupscustom1');
			//alert (c_value);	
			if (c_value!=null && c_value!="")
			{
				 //welcome again
				 return;
			}
			
			setCookie('modalpopupscustom1','modalpopupscustom1',365);
			
			//<a href=\"javascript:ModalPopupsCustom1Cancel()\" style=\"text-decoration: none\"><img border='0' src='http://www.classifiedsgoa.com/i/subhead.jpg' ALT='' width='500' title=''></a>
			//<img border='0' src='http://www.classifiedsgoa.com/i/sub.jpg' ALT='' width='500' title=''>
            ModalPopups.Custom("idCustom1",
                "<table cellpadding='0' cellspacing='0' width='500' bgcolor='#ffffcc'><tr><td height='40' valign='middle'><h2 style='display:inline;'>&nbsp;&nbsp;We'll send daily ads to you!</h2></td><td><a href='javascript:ModalPopupsCustom1Cancel()'><img src='i/close.jpg' alt='Hide'></a></td></tr></table>",
                "<table cellpadding='0' cellspacing='0' width='500'>" + 
                "<tr><td colspan='2'><br>&nbsp;<br></td></tr>" + 
                "<tr bgcolor='#990000' height='40'><td>&nbsp;&nbsp;<input type=text id='inputCustom1EMail' value='Enter your e-mail id' width='150' style='width:150px;'></td><td><input type='button' onclick='ModalPopupsCustom1Save();' width='180'  value='FREE INSTANT ACCESS'  style='width:180px; background-color: #0d73b5;border: 1px solid #BDBF00; color:#ffffff; font-weight:900'>&nbsp;&nbsp;&nbsp;&nbsp;<input type='button' value='CLOSE' onclick='ModalPopupsCustom1Cancel()'  style='background-color: #0d73b5;border: 1px solid #BDBF00; color:#ffffff; font-weight:900'></td></tr>" + 
				"<tr><td colspan='2'  height='30'><div id='resultdiv_sendme1'>&nbsp;<BR>&nbsp;</div></td></tr>" +
                "</table>" + 
                "", 
                {
                    width: 510,
                    buttons: "",
                    okButtonText: "Save",
                    cancelButtonText: "Cancel",
                    onOk: "ModalPopupsCustom1Save()",
                    onCancel: "ModalPopupsCustom1Cancel()"
                }
            );
        	//ok,cancel	    
            ModalPopups.GetCustomControl("inputCustom1EMail").focus(); 
        }
        

        function ModalPopupsCustom1Save() {
            var custom1Email = ModalPopups.GetCustomControl("inputCustom1EMail").value; 
			if (checkemail1(custom1Email))
			{
				http_sendme.open("get", "sendme.php?email="+custom1Email);
				http_sendme.onreadystatechange = loadresult_sendme1;
				http_sendme.send(null);

            }
        }
        
        function ModalPopupsCustom1Cancel() {
            //alert('You pressed Cancel');
            ModalPopups.Cancel("idCustom1");
        }
        

		function ModalPopupsCustom1SaveDailyAds() {
            var custom1Email = ModalPopups.GetCustomControl("inputCustom1EMailDailyAds").value; 
			if (checkemail1(custom1Email))
			{
				http_sendme.open("get", "sendme.php?email="+custom1Email);
				http_sendme.onreadystatechange = loadresult_sendme1DailyAds;
				http_sendme.send(null);

            }
        }
	

	function SubDomainOfClassifiedsGoaModalPopupsCustom1() {

			//alert(navigator.userAgent.toLowerCase());
			if (navigator.userAgent.toLowerCase().indexOf('msie') !=-1)
			{
				// if ie then continue 
			}
			else if (navigator.userAgent.toLowerCase().indexOf('firefox') !=-1)
			{
				// if firefox then continue 	
			}
			else
			{
				return;
			}


			// if URL has eid the do not show the popup
			if(window.location.href.indexOf("eid") != -1 ) {
				return;
			}	
			// if cookie is set on the client pc the do not show the popup
			c_value = getCookie('modalpopupscustom1');
			//alert (c_value);	
			if (c_value!=null && c_value!="")
			{
				 //welcome again
				 return;
			}
			
			setCookie('modalpopupscustom1','modalpopupscustom1',365);
			
			//<a href=\"javascript:ModalPopupsCustom1Cancel()\" style=\"text-decoration: none\"><img border='0' src='http://www.classifiedsgoa.com/i/subhead.jpg' ALT='' width='500' title=''></a>
			//<img border='0' src='http://www.classifiedsgoa.com/i/sub.jpg' ALT='' width='500' title=''>
			
			//
			// height: 350,
			// "<table cellpadding='1' cellspacing='1'  border='1' width='500'><tr bgcolor='#ffffcc'><td colspan='3' height='30' valign='middle'><h3 style='display:inline;'>&nbsp;&nbsp;We'll send daily ads to you!</h3></td><td align='right'><a href='javascript:SubDomainOfClassifiedsGoaModalPopupsCustom1Cancel()'><img src='i/close.jpg' alt='Hide'></a></td></tr><tr><td>&nbsp;&nbsp;<input type=text id='inputCustom1EMailDailyAds' value='Enter your e-mail id' width='150' style='width:150px;'></td><td colspan='1' align='center'><input type='button'  onclick='ModalPopupsCustom1SaveDailyAds();' width='180' alt='FREE INSTANT ACCESS' title='FREE INSTANT ACCESS'  value='FREE INSTANT ACCESS'  style='width:250px; background-color: #0d73b5;border: 1px solid #BDBF00; color:#ffffff; font-weight:900'></td><td colspan='2'>&nbsp;</td></tr><tr><td colspan='4'><div id='resultdiv_sendmeDailyAds'>&nbsp;</div></td><tr></table>" +

            ModalPopups.Custom("idCustom1",
                "<table cellpadding='0' cellspacing='0' width='500' bgcolor='#ffffcc'><tr><td height='30' valign='middle'><h3 style='display:inline;'>&nbsp;&nbsp;Enquiry for Ongoing and Upcomeing projects</h3></td><td><a href='javascript:SubDomainOfClassifiedsGoaModalPopupsCustom1Cancel()'><img src='i/close.jpg' alt='Hide'></a></td></tr></table>",
                "<table cellpadding='1' cellspacing='1' border='1' width='500'>" + 
                "<!--<tr><td colspan='3'></td></tr>-->" + 
				"<tr xxxbgcolor='#990000' height='20'><td colspan='3'>&nbsp;&nbsp;<small>Projects:</small>&nbsp;&nbsp;<BR><div id='resultdiv_currentmonthads'></div></td></tr>" +			
				"<tr xxxbgcolor='#990000' height='20'><td>&nbsp;&nbsp;<small>Name:</small>&nbsp;&nbsp;<BR><input type=text id='name' value='' width='150' style='width:150px;'></td><td><small>Mobile</small><BR><input type=text id='phone' value='' width='150' style='width:150px;'></td><td rowspan='2' valign='top'><small>Enquiry details:</small><BR><textarea id='details' rows='2' class='form1' id='details' style='width:150px;'></textarea></td></tr>" + 
                "<tr xxxbgcolor='#990000' height='20'><td>&nbsp;&nbsp;<small>Email id:</small>&nbsp;&nbsp;<BR><input type=text id='inputCustom1EMail' value='' name='email' width='150' style='width:150px;'></td><td><table cellspacing=0 cellpadding=0 border=0><tr><td><small>My budget</small><BR><input type=text id='budget' value='' width='70' style='width:70px;'></td><td>&nbsp;</td><td></td></tr></table></td></tr>" + 
				"<tr xxxbgcolor='#990000'><td colspan='2'><input type='button' onclick='SubDomainOfClassifiedsGoaModalPopupsCustom1Save();' width='180' alt='Submit Your Enquiry' title='Submit Your Enquiry'  value='Submit Your Enquiry'  style='width:180px; background-color: #0d73b5;border: 1px solid #BDBF00; color:#ffffff; font-weight:900'>&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input type='button' value='CLOSE' onclick='SubDomainOfClassifiedsGoaModalPopupsCustom1Cancel()'  style='background-color: #0d73b5;border: 1px solid #BDBF00; color:#ffffff; font-weight:900'>&nbsp;</td></tr>" + 
				"<tr><td colspan='3'  ><div id='resultdiv_sendme1'>&nbsp;<BR>&nbsp;</div></td></tr>" +
                "</table>" + 
                "", 
                {
                    width: 510,
					height: 240,
                    buttons: "",
                    okButtonText: "Save",
                    cancelButtonText: "Cancel",
                    onOk: "SubDomainOfClassifiedsGoaModalPopupsCustom1Save()",
                    onCancel: "SubDomainOfClassifiedsGoaModalPopupsCustom1Cancel()"
                }
            );
        	//ok,cancel	    
            ModalPopups.GetCustomControl("inputCustom1EMail").focus(); 
			ModalPopups.GetCustomControl("resultdiv_currentmonthads").innerHTML = loading_currentmonthads();;
        }
        

        function SubDomainOfClassifiedsGoaModalPopupsCustom1Save() {
            var custom1Email = ModalPopups.GetCustomControl("inputCustom1EMail").value; 
			var custom1Name = ModalPopups.GetCustomControl("name").value; 
			var custom1Phone = ModalPopups.GetCustomControl("phone").value; 
			var custom1Budget = ModalPopups.GetCustomControl("budget").value; 
			var custom1Zid = ModalPopups.GetCustomControl("zid").value; 
			var custom1Details = ModalPopups.GetCustomControl("details").value; 
			var custom1Uid = ModalPopups.GetCustomControl("uid").value; 
			if (checkemail1(custom1Email))
			{	
					
				url = encodeURI("sms_enquiry.php?mode=enq&email="+custom1Email+"&name="+custom1Name+"&phone="+custom1Phone+"&budget="+custom1Budget+"&zid="+custom1Zid+"&details="+custom1Details+"&uid="+custom1Uid);
				//alert( url );
				http_sendme.open("get", url);
				http_sendme.onreadystatechange = loadresult_sendme1;
				http_sendme.send(null);
            }
        }
        
        function SubDomainOfClassifiedsGoaModalPopupsCustom1Cancel() {
            //alert('You pressed Cancel');
            ModalPopups.Cancel("idCustom1");
        }
        

	
		function setCookie(c_name,value,expiredays)
		{
			var exdate=new Date();
			exdate.setDate(exdate.getDate()+expiredays);
			document.cookie=c_name+ "=" +escape(value)+
			((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
		}
	

		function getCookie(c_name)
		{
			if (document.cookie.length>0)
			{
				c_start=document.cookie.indexOf(c_name + "=");
				if (c_start!=-1)
			    {
				    c_start=c_start + c_name.length+1;
				    c_end=document.cookie.indexOf(";",c_start);
				    if (c_end==-1) c_end=document.cookie.length;
					    return unescape(document.cookie.substring(c_start,c_end));
		    	}
		  	}
			return "";
		}
		

		function checkemail1(custom1Email)
		{
			//var str=document.sendme.email.value
			str = custom1Email; 
			var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
			if (filter.test(str))
			testresults=true;
			else
			{
				alert("Please input a valid email address!")
				testresults=false
			}
			return (testresults)
		}
			
		
		function loadresult_sendme1()
		{
			if(http_sendme.readyState == 4)
		  	{ 
				var response = http_sendme.responseText;
				//alert(response );
		       document.getElementById("resultdiv_sendme1").innerHTML = response;
		 	}
		}

		function loadresult_sendme1DailyAds()
		{
			if(http_sendme.readyState == 4)
		  	{ 
				var response = http_sendme.responseText;
				//alert(response );
		       document.getElementById("resultdiv_sendmeDailyAds").innerHTML = response;
		 	}
		}

		function loading_currentmonthads()
		{
			http_currentmonthads.open("get", "currentmonthads.php");
			http_currentmonthads.onreadystatechange = loadresult_currentmonthads;
			http_currentmonthads.send(null);
		}


		function loadresult_currentmonthads()
		{
			if(http_currentmonthads.readyState == 4)
		  	{ 
				var response = http_currentmonthads.responseText;
				//alert(response );
		       document.getElementById("resultdiv_currentmonthads").innerHTML = response;
		 	}
		}


