function translator(pattern) {
	var open_in_same_window = 1;
	var my_location = unescape(document.location.toString());
	var new_location ='';
	var new_pattern = '';
	if (my_location.indexOf('translate_c?') != -1) {
		/// From google...
		var indexof_u = my_location.indexOf('u=');
		if (indexof_u == -1) {
			new_location = document.location;
		}
		else {
			var subs = my_location.substring(indexof_u, my_location.length);
			var ss = subs.split('&');
			new_location = ss[0].substring(2, ss[0].length);
		}
	}
	else {
		new_location = document.location;
	}

	indexof_p = pattern.indexOf('|');

	var isen = '';
	if (indexof_p == -1) {
		indexof_p1 = pattern.indexOf('><');
		if (indexof_p1 == -1) {
			new_pattern = pattern;
			if (pattern == 'en') {
				isen = 1;
			}
		}
		else {
			var psplit =pattern.split('><');
			new_pattern = psplit[0]+'|'+psplit[1];
			if (psplit[1] == 'en') {
				isen = 1;
			}
		}
	}
	else {
		var psplit = pattern.split('|');
		new_pattern = psplit[0]+'|'+psplit[1];
		if (psplit[1] == 'en') {
			isen = 1;
		}
	}

	var thisurl = '';
	if (isen == 1) {
		thisurl = new_location;
	}
	else {
		thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;
	}

	if (open_in_same_window == 1) {
		window.location.href = thisurl;
	}
	else {
		if (CanAnimate ){
			msgWindow=window.open('' ,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
			msgWindow.focus();
			msgWindow.location.href = thisurl;
		}
		else {
			msgWindow=window.open(thisurl,'subwindow','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
		}
	}
}
function check() {
		if(!document.form1.your_name.value.length) {
	   	alert("Please Enter Name\n");
	  	document.form1.your_name.focus();
	   	return false;
   	}
   	if(!document.form1.company_name.value.length) {
	   	alert("Please Enter Company Name\n");
	  	document.form1.company_name.focus();
	   	return false;
   	}
	if(!document.form1.username.value.length) {
		alert ("Please enter your Email Id");
	    document.form1.username.focus();
	    return false;
    }
	if (document.form1.username.value.indexOf('@') == -1 || document.form1.username.value.indexOf('@') == 0) {
		alert("Error in E-mail address");
        document.form1.username.focus();
        return false;
   }
   if (document.form1.username.value.indexOf('.') == -1) {
	   alert("Error in E-mail address");
       document.form1.username.focus();
       return false;
   }
   a=document.form1.username.value.indexOf('@');
   if (a+1 == document.form1.username.value.length){
	   alert("Error in e-mail address");
       document.form1.username.focus();
       return false;
   }
   b=document.form1.username.value.indexOf('.');
   if (b+1 ==document.form1.username.value.length){
	   alert("Error in e-mail address");
       document.form1.username.focus();
       return false;
   }
   if (document.form1.username.value.indexOf('@') != document.form1.username.value.indexOf('@')) {
	   alert("Please Specify One E-mail address only");
	   document.form1.username.focus();
       return false;
    }
    a=document.form1.username.value.indexOf('@');
    if (a+1 == document.form1.username.value.lastIndexOf('.')){
       alert("Error in E-mail address");
       document.form1.username.focus();
       return false;
    }
    b=document.form1.username.value.lastIndexOf('.');
    if (b+1 == document.form1.username.value.length){
	    alert("Error in E-mail address");
	    document.form1.username.focus();
        return false;
    }
    c=document.form1.username.value.lastIndexOf('@');
    if (c+1 == document.form1.username.value.length) {
	    alert("Error in E-mail address");
        document.form1.username.focus();
        return false;
    }
	 if(!document.form1.address1.value.length) {
	   	alert("Please Enter address Name\n");
	  	document.form1.address1.focus();
	   	return false;
   	}
   	
	 if(!document.form1.city.value.length) {
	   	alert("Please Enter City Name\n");
	  	document.form1.city.focus();
	   	return false;
   	}
   	
	if(!document.form1.state.value.length) {
	   	alert("Please Enter State Name\n");
	  	document.form1.state.focus();
	   	return false;
   }
   if(document.form1.country.value=="x") {
		alert("Please Enter Your Country \n");
		document.form1.country.focus();
		return false;
	}
	if(!document.form1.phone.value.length) {
		alert("Please Enter Your Phone No \n");
		document.form1.phone.focus();
		return false;
	}
	if(document.form1.requirments.value==0) {
		alert("Please Enter Your Requirements \n");
		document.form1.requirments.focus();
		return false;
	}
	   	
}
/*function openwin(nm,width,height,wintitle){
	var name=nm;
	var path="";
	var pop="";
	if (pop && !pop.closed) {
	   pop.close();
	}
	pop=eval("window.open('"+name+"','+wintitle+','chrome[4],toolbar=no,left=5,top=5,width="+width+",height="+height+",directories=no,menubar=no,scrollbars=yes,left=2,right=2')");
	if (!pop.opener){
		openwin.opener = self;
	}
}*/
function openwin(path1,width1,height1,winame1){
	var pop1;
	if (pop1 && !pop1.closed) {
	   pop1.close();
	}
	pop1=eval("window.open('"+path1+"','"+winame1+"','chrome[4],toolbar=no,left=5,top=5,width="+width1+",height="+height1+",directories=no,menubar=no,scrollbars=yes,left=2,right=2')");
	if (!pop1.opener) popUpWin.opener = self;
}
function addBookmark(url,title) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
          