//----------------------------------Function to activate transparent menu------------------------
function init() {
			if (TransMenu.isSupported()) {
				TransMenu.initialize();

				menu1.onactivate = function() { document.getElementById('aboutus').src = 'images/aboutus_ro.gif';};
				menu1.ondeactivate = function() { document.getElementById('aboutus').src = 'images/aboutus.gif';};


				menu2.onactivate = function() { document.getElementById('aboutgoa').src = './images/about_ro.gif';};
				menu2.ondeactivate = function() { document.getElementById('aboutgoa').src = './images/about.gif';};


				menu3.onactivate = function() { document.getElementById('holidays').src = './images/holidays_ro.gif';};
				menu3.ondeactivate = function() { document.getElementById('holidays').src = './images/holidays.gif';};


				menu4.onactivate = function() { document.getElementById('events').src = './images/events_ro.gif';};
				menu4.ondeactivate = function() { document.getElementById('events').src = './images/events.gif';};


				menu5.onactivate = function() { document.getElementById('cruising').src = './images/cruising_ro.gif';};
				menu5.ondeactivate = function() { document.getElementById('cruising').src = './images/cruising.gif';};

				menu6.onactivate = function() { document.getElementById('weddings').src = './images/weddings_ro.gif';};
				menu6.ondeactivate = function() { document.getElementById('weddings').src = './images/weddings.gif';};
		}
}


var xmlHttp

function getVote(gal_str,srno)
{

document.getElementById('container').style["display"]="block";
document.getElementById('container').style["visibility"]="visible";
document.getElementById('content').style["display"]="block";
document.getElementById('content').style["visibility"]="visible";
document.getElementById('hidepage').style["visibility"] = "visible";
document.getElementById('hidepage').style["display"] = "block";

getPageSize();

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="gal_ajax.php"
url=url+"?str="+gal_str;
url=url+"&sr_no="+srno;
//alert(url);
//url=url+"&poll_id="+document.poll_form.poll_id.value
//url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 

xmlHttp.open("GET",url,true)
xmlHttp.send(null)


} 

function stateChanged() 
{ 
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 

document.getElementById('content').innerHTML=xmlHttp.responseText;
init_dw_Scroll();

window.setTimeout('test()',2000);

//test();

 } 

} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
 {
 objXMLHttp=new XMLHttpRequest()
 }
else if (window.ActiveXObject)
 {
 objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
 }
return objXMLHttp
}

function test()
{
document.getElementById('hidepage').style["visibility"] = "hidden";
document.getElementById('hidepage').style["display"] = "none";

}


function st2new(n)
{
	for(i=1;i<=2;i++)
	{
		if (n==i)
		{
			showDiv('dd'+n);
		}
		else
		{
			hideDiv('dd'+i);
		}
	}

	
}
function showDiv(divnm)
{
		document.getElementById(divnm).style["display"]="block" ;
		document.getElementById(divnm).style["visibility"]="visible" ;
}

function hideDiv(divnm)
{
		document.getElementById(divnm).style["display"]="none" ;
		document.getElementById(divnm).style["visibility"]="hidden" ;
}

function getPageSize(){

var xScroll, yScroll;

if (window.innerHeight && window.scrollMaxY) { 
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode
xScroll = document.documentElement.scrollWidth;
yScroll = document.documentElement.scrollHeight;
} else { // Explorer Mac...would also work in Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}

var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
} 

// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else { 
pageHeight = yScroll;
}

// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){ 
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
document.getElementById("container").style.height= pageHeight + 'px';
}


//--------------------------------------------------------------------------
//Function to postion 'content' div of image gallery to center
//-------------------------------------------------------------------------
function contentdivpos()
{

// variables to get screen height and width of window 

var winWidth=screen.width;
var winHeight=screen.height;

// Window width minus resolution of the screen the design is designed for
// Divide by 2 to get outer space between screen border and the main table
// Add width from outer table border to start of element. 
 
 
var left = (winWidth-1024)/2+80;
var top = 38;

document.getElementById("content").style.left=left+'px';
document.getElementById("content").style.top=top+'px';

}


//--------------------------------------------------------------------------
//Function to view slideshow div
//-------------------------------------------------------------------------
function viewslideshow()
{
	document.getElementById("slideshow1").style.display="block";
	document.getElementById("slideshow1").style.visibility="visible";	

}

//--------------------------------------------------------------------------------

// Function to validate 'Validate Feedback' Form
//--------------------------------------------------------------------------------
function validatefeedbackform()
{
	var msg = "";
	
	if (document.feedbackform.name.value == "") { msg = msg+"Name\n"; }
	if (document.feedbackform.company.value == "") { msg = msg+"Company\n"; }
	if (document.feedbackform.address.value == "") { msg = msg+"Address\n"; }
	if (document.feedbackform.city.value == "") { msg = msg+"City\n"; }
	if (document.feedbackform.state.value == "") { msg = msg+"State\n"; }
	if (document.feedbackform.country.value == "") { msg = msg+"Country\n"; }
	if (document.feedbackform.pincode.value == "") { msg = msg+"Pincode\n"; }
	if (document.feedbackform.email.value == "") { msg = msg+"Email\n"; }
	else
	{
		var emailReegxp = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.([a-zA-Z]{2,6})$/;
		if (!emailReegxp.test(document.feedbackform.email.value))
		{
			msg = msg+"Invalid Email Address\n";
		}
		
	}	
	if (document.feedbackform.phone.value == "") { msg = msg+"Telephone No.\n"; }
	if (document.feedbackform.mobile.value == "") { msg = msg+"Mobile\n"; }
	if (document.feedbackform.msg.value == "") { msg = msg+"Comments\n"; }
	if (document.feedbackform.security_code.value == "") { msg = msg+"Verification Code\n"; }
	if (msg != "") { alert("Please fill in following Details\n\n"+msg);}
	else {document.feedbackform.submit(); }	
	 
}

