
function query_validator(f1, wName, wWidth, wHeight, wResize)
{
  if ((f1.nam.value == "Name")||(f1.nam.value == ""))
  {
   alert("Please Enter Name");
    f1.nam.value="";
    f1.nam.focus();
	return false;
  }
  
  
  
  if((f1.phonenumber1.value=="Mobile No")||(f1.phonenumber1.value==""))
{
//getElementById("mail").innerHTML="*Enter the EMail";
alert("Please Enter Phone Number");
f1.phonenumber1.value="";
f1.phonenumber1.focus();
return false;
}
	
	if((f1.phonenumber1.value!=""))
	{ 
var checkVal="0123456789";
var objVal=f1.phonenumber1.value;
var ok=true;
for(i=0;i<objVal.length;i++)
{
var myChar=objVal.charAt(i);
for(j=0;j<checkVal.length;j++)
if (myChar==checkVal.charAt(j)) break;
if(j==checkVal.length)
{
ok=false;
break;
}
}
if(!ok) //myChar is not in [0,9]
{
alert("This is not a valid valid Mobile Number!");
f1.phonenumber1.value="";
f1.phonenumber1.focus();
return false;
return;
}
}


	if((f1.code.value==""))
	{
		alert("Please enter the code you see on the right");	
		f1.code.focus();
		return false;	
	}
			
				if((f1.code.value)!=(f1.code1.value))
	{
		alert("Please enter correct code you see on the right");	
		f1.code.focus();
		return false;	
	}




if(!f1.click1.checked)
	{
	 alert("Please Accept the Terms and conditions"); 
     return false;
     } 
  features = 'location=0,scrollbars=0,status=0,resizable=no,left=300,top=30'
                 + ((wResize) ? 1 : 0)
                 + ((wWidth) ? ',width=' + wWidth : '')
                 + ((wHeight) ? ',height=' + wHeight : '');
  popWin = window.open('',wName,features);
  if(popWin.focus) { popWin.focus(); }
  return true;
}

function selectAll1(nam) {
var tempval=eval("document.getElementById('nam')")
tempval.value ="";
tempval.focus()
tempval.select()
}
function selectAll2(phonenumber1) {
var tempval1=eval("document.getElementById('phonenumber1')")
tempval1.value ="";
tempval1.focus()
tempval1.select()
}

function selectAll3(service) {
var tempval2=eval("document.getElementById('service')")
tempval2.value ="";
tempval2.focus()
tempval2.select()
}
function selectAll6(code) {
var tempval6=eval("document.getElementById('code')")
tempval6.value ="";
tempval6.focus()
tempval6.select()
}


var mywin=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
mywin=window.open(mypage,myname,settings);}






/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetfromcursorX=-20 //Customize x offset of tooltip
var offsetfromcursorY=-20 //Customize y offset of tooltip

var offsetdivfrompointerX=40//Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=-19 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="images/tooltip_icon.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip




/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


images = new Array(3);

images[0] = "<a href = 'http://www.kanyabeautysalon.com' target='_blank'><img src='images/gif3.gif' alt='Visit Kanyabeautysalon.com' border='0' /></a>";

images[1] = "<img src='images/gif2.gif' alt='Oryzadayspa.com' border='0' />";

images[2] = "<a href = 'http://www.bouncehere.com' target='_blank'><img src='images/gif1.gif' alt='Visit BounceHere' border='0' /></a>";
index = Math.floor(Math.random() * images.length);
