var xmlHttp

function GetXmlHttpObject()

{

var xmlHttp=null;

try

 {

 xmlHttp=new XMLHttpRequest();

 }

catch (e)

 {

 try

  {

  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

  }

 catch (e)

  {

  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

  }

 }

return xmlHttp;

}



function func_gndr(id)

{

//alert(document.getElementById("showdetails").style.display);

xmlHttp=GetXmlHttpObject();

if (xmlHttp==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var url="ajx.php";

url=url+"?ccid="+id;

xmlHttp.onreadystatechange=stateChanged;

xmlHttp.open("GET",url,true);

xmlHttp.send(null);

}

function stateChanged() 

{ 

   if(xmlHttp.readyState==4)

	{ 

	document.getElementById("showhtd").innerHTML=xmlHttp.responseText;

	}

	else{

		document.getElementById("showhtd").innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

}





function func_imageman(pid,imgno)

{

	//alert("hi"+pid+imgno);

xmlHttppid=GetXmlHttpObject();

if (xmlHttppid==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var urlpid="ajximage.php";

urlpid=urlpid+"?ccid="+pid+"&imageno="+imgno;

xmlHttppid.onreadystatechange=stateChangedurlpid;

xmlHttppid.open("GET",urlpid,true);

xmlHttppid.send(null);

}

function stateChangedurlpid() 

{ 

   //alert(xmlHttppid.responseText);

   

   if(xmlHttppid.readyState==4)

	{ 

	document.getElementById("showimageew").innerHTML=xmlHttppid.responseText;

	}

	else{

		document.getElementById("showimageew").innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

		

		

}





function func_imageman_pop(pid,imgno,idno_pop)

{

//alert('id: '+idno_pop);

xmlHttppid=GetXmlHttpObject();

if (xmlHttppid==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var urlpid="ajximage.php";

urlpid=urlpid+"?ccid="+pid+"&imageno="+imgno;

xmlHttppid.onreadystatechange=function stateChangedurlpid() 

{ 

   //alert(xmlHttppid.responseText);

   var shown_divv='showimageew_pop'+idno_pop;

   if(xmlHttppid.readyState==4)

	{ 

	document.getElementById(shown_divv).innerHTML=xmlHttppid.responseText;

	}

	else{

		document.getElementById(shown_divv).innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

		

		

}



xmlHttppid.open("GET",urlpid,true);

xmlHttppid.send(null);

}







function image_zoooom(pid,imgno)

{

	//alert("hi"+pid+imgno);

xmlHttpzoooom=GetXmlHttpObject();

if (xmlHttpzoooom==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var urlzoooom="ajxzoom.php";

urlzoooom=urlzoooom+"?ccid="+pid+"&imageno="+imgno;

xmlHttpzoooom.onreadystatechange=stateChangedurlzoooom;

xmlHttpzoooom.open("GET",urlzoooom,true);

xmlHttpzoooom.send(null);

}

function stateChangedurlzoooom() 

{ 

   //alert(xmlHttppid.responseText);

   if(xmlHttpzoooom.readyState==4)

	{ 

	document.getElementById("big_images").innerHTML=xmlHttpzoooom.responseText;

	}

	else{

		document.getElementById("big_images").innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

		

		

}











/*xmlHttppid_pop=GetXmlHttpObject();

if (xmlHttppid_pop==null)

  {

  alert ("Your browser does not support AJAX!");

  return;

  } 

var urlpid_pop="ajximage.php";

urlpid_pop=urlpid_pop+"?ccid="+pid_pop+"&imageno="+imgno_pop;

xmlHttppid_pop.onreadystatechange=stateChangedurlpid_pop(idno_pop);

xmlHttppid_pop.open("GET",urlpid_pop,true);

xmlHttppid_pop.send(null);

}

function stateChangedurlpid_pop(idno_pop) 

{ 

   

   var shown_divv='showimageew_pop'+idno_pop;

   alert(xmlHttppid_pop.readyState);//alert(xmlHttppid_pop.responseText);

*/   /*if(xmlHttppid_pop.readyState==4)

	{ 

	document.getElementById(shown_divv).innerHTML=xmlHttppid_pop.responseText;

	}

	else{

		document.getElementById(shown_divv).innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}*/

		

		

//}

















function continueone(frmone)

{

	if(document.getElementById("nametxt").value == "")

	{

		alert("Please enter your name");

		document.getElementById("nametxt").focus();

		return false;

	}

	 if ( document.getElementById("gendrr").selectedIndex == 0 )

    {

        alert ( "Please select your gender." );

        return false;

    } 

	if ( document.getElementById("httsh").selectedIndex == 0 )

    {

        alert ( "Please select your height." );

        return false;

    }

	 if ( document.getElementById("drvr").selectedIndex == 0 )

    {

        alert ( "Please select your driver length." );

        return false;

    }

	 if ( document.getElementById("irndis").selectedIndex == 0 )

    {

        alert ( "Please select your driver iron length." );

        return false;

    }



	

	

	var mm=document.getElementById(frmone);

	 var z="";

	for(i=0;i<mm.length;i++)

	{

	 z=z + mm.elements[i].name +"=" + mm.elements[i].value + "&" ;

	}

	

	//alert(z);

	

	

	 request=GetXmlHttpObject();

	

	request.open("POST", "ajxone.php?pagee=one", true); 

    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  

    request.send(z);

	request.onreadystatechange = function()

	{

		if(request.readyState == 4)

		{

			if(request.status == 200)

			{

				var response = request.responseText;

				//alert(response);

				

				document.getElementById('question').innerHTML = response;

			}

		}

		else{

		document.getElementById('question').innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

	}

	

	}

	

	

	function continuetwo(frmtwwwd)

   {

	 if ( document.getElementById("selwtmm").selectedIndex == 0 )

    {

        alert ( "Please select your wrist to middle finger length." );

        return false;

    } 

	if ( document.getElementById("selwtff").selectedIndex == 0 )

    {

        alert ( "Please select your wrist to floor length." );

        return false;

    }

	

	

	var mmm=document.getElementById(frmtwwwd);

	 var zz="";

	for(j=0;j<mmm.length;j++)

	{

	 zz=zz + mmm.elements[j].name +"=" + mmm.elements[j].value + "&" ;

	}

	

	 requesttwo=GetXmlHttpObject();

	

	requesttwo.open("POST", "ajxone.php?pagee=two", true); 

    requesttwo.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  

    requesttwo.send(zz);

	requesttwo.onreadystatechange = function()

	{

		if(requesttwo.readyState == 4)

		{

			if(requesttwo.status == 200)

			{

				var responsetwo = requesttwo.responseText;

				//alert(response);

				document.getElementById('question').innerHTML = responsetwo;

			}

		}

		else{

		document.getElementById('question').innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

	}

	

	}

	function funcoth(iid)

      {

		if(iid=='other')

		{

		document.getElementById("othriid").style.display='block';

		}

		else

		{

		document.getElementById("othriid").style.display='none';

		}

      }



	function continuethree(frmthree)

   {

	   if ( document.getElementById("holescre").selectedIndex == 0 )

    {

        alert ( "Please select your score of hole." );

        return false;

    }

	   

	var mmmm=document.getElementById(frmthree);

	 var zzz="";

	for(k=0;k<mmmm.length;k++)

	{

	 zzz=zzz + mmmm.elements[k].name +"=" + mmmm.elements[k].value + "&" ;

	}

	//alert(zz);

	

	 requestthree=GetXmlHttpObject();

	

	requestthree.open("POST", "ajxone.php?pagee=three", true); 

    requestthree.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  

    requestthree.send(zzz);

	requestthree.onreadystatechange = function()

	{

		if(requestthree.readyState == 4)

		{

			if(requestthree.status == 200)

			{

				var responsethree = requestthree.responseText;

				document.getElementById('question').innerHTML = responsethree;

			}

		}

		else{

		document.getElementById('question').innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

	}

	

	}

	

	

	

	

	

	

	

	

	

	

	function getBrowserHeight() {

                var intH = 0;

                var intW = 0;

               

                if(typeof window.innerWidth  == 'number' ) {

                   intH = window.innerHeight;

                   intW = window.innerWidth;

                } 

                else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))                {

                    intH = document.documentElement.clientHeight;

                    intW = document.documentElement.clientWidth;

                }

                else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {

                    intH = document.body.clientHeight;

                    intW = document.body.clientWidth;

                }



                return { width: parseInt(intW), height: parseInt(intH) };

            } 

                function setLayerPosition() {

                var shadow = document.getElementById('shadow');
				
                var question = document.getElementById('question');
				
                var sd=document.body.scrollHeight; 
				
                var bws = getBrowserHeight();

                shadow.style.width = bws.width + 'px';

                shadow.style.height = bws.height + 'px';



                question.style.left = parseInt((bws.width - 600) / 2) + 'px'; 

                question.style.top = parseInt((bws.height - 300) / 2) + 'px';



                shadow = null;

                question = null;

            }

			

			

			

			function showLayer(xx) {

            

			    setLayerPosition();

                 

                var shadow = document.getElementById('shadow');

                var question = document.getElementById(xx);

 

                shadow.style.display = 'block'; 

                question.style.display = 'block';



                shadow = null;

                question = null;             

            }

			

			/* For Product Display*/

			function setLayerPosition_image() {

                var question_image = document.getElementById('image_zoom');

                var sd=document.body.scrollHeight; 

                var bws = getBrowserHeight();

                question_image.style.left = parseInt((bws.width - 700) / 2);

                question_image.style.top = parseInt((bws.height - 300) / 2);

                question_image = null;

            }

			function showLayer_image(xx) {

			    /*setLayerPosition_image();

                var question_image = document.getElementById(xx);

                question_image.style.display = 'block';

                question_image = null;             */

            }

			function hideLayer_image(xy) {

                var question_image = document.getElementById(xy);

                question_image.style.display = 'none';

                question_image = null; 

				return false;

            

			    }

			/*End For Product Display*/

			

			

	function hideLayer(xy) {

	request_close=GetXmlHttpObject();

	request_close.open("POST", "ajxone.php?pagee=closeaction", true); 

    request_close.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  

    request_close.send(null);

	request_close.onreadystatechange = function()

	{

		if(request_close.readyState == 4)

		{

			if(request_close.status == 200)

			{

				var response_close = request_close.responseText;

				document.getElementById('question').innerHTML = response_close;

			}

		}

		else{

		document.getElementById('question').innerHTML="<img src='images/progressbar.gif' alt='Loading' border='0' />";

		}

	}

                var shadow = document.getElementById('shadow');

                var question = document.getElementById(xy);

 

                shadow.style.display = 'none'; 

                question.style.display = 'none';



                shadow = null;

                question = null; 

				return false;

            

			    }

				window.onresize = setLayerPosition;