var today = new Date();
var day   = today.getDay();
var date  = today.getDate();
var month = today.getMonth();
var year  = today.getFullYear();
var day2=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
/// for the new product scrolling section 
function verifyCompatibleBrowser(){ 
	this.ver=navigator.appVersion 
	this.dom=document.getElementById?1:0 
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
	this.ie4=(document.all && !this.dom)?1:0; 
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0; 
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
	return this 
} 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;
	this.newsScroll=newsScroll; 
	this.moveIt=b_moveIt; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function b_moveIt(x,y){ 
	this.x=x;this.y=y 
	this.css.left=this.x 
	this.css.top=this.y 
} 
//Makes the object scroll up 
function newsScroll(speed){ 
	if(this.y>-this.scrollHeight){ 
		this.moveIt(0,this.y-pr_step) 
		setTimeout(this.obj+".newsScroll("+speed+")",speed) 
	}else if(loop) { 
		this.moveIt(0,lstart) 
		eval(this.obj+".newsScroll("+speed+")") 
	  } 
} 
//Makes the object 
function InitialiseAutoScrollArea(){ 
	objContainer=new ConstructObject('divASContainer') 
	objContent=new ConstructObject('divASContent','divASContainer') 
	// objContent.scrollHeight -= objContainer.scrollHeight;
	objContent.moveIt(0,lstart) 
	objContainer.css.visibility='visible' 
	objContent.newsScroll(speed) 
} 
function setDivContent()
{
	document.getElementById("date_values").innerHTML = day2[day] + ", " + date + " " + months[month]+" " + year;
	var content = '<p> DESIGNED IN THE UK...<br>CONSTRUCTED IN INDIA</p><p>The concept and design of your website originates at our UK Office.</p><p>Your requirements are then relayed to our highly qualified, professional developers in India.</p><p>We monitor the construction and progress - so you get all the benefits of outsourcing in terms of cost and expertise without any of the hassle. </p><p>...And always at a fixed price payable in GBPounds Sterling.';
	document.getElementById("divcont").innerHTML = content;
}
function SfunGetcontacts()
{
	if(document.frmselect.LbcountrySelect.value=="0")
	{
		alert("Please select a country");	
	}
	else
	{
		window.location.href=".html#service";
	}
	
}


function windowPopup1(param)
{
	window.open(param,'','width=600,height=500,scrollbars=1,toolbars=no');
}

function validate_frmrequestquote()
{
	frm=document.frmrequest;

	if(frm.txtcompany.value=="")
	{
		alert("Please enter company name");
		frm.txtcompany.focus();
		return false;
	}
	if(frm.txtaddress1.value=="")
	{
		alert("Please enter address1");
		frm.txtaddress1.focus();
		return false;
	}
	if(frm.txttown.value=="")
	{
		alert("Please enter town");
		frm.txttown.focus();
		return false;
	}
	if(frm.txtcounty.value=="")
	{
		alert("Please enter county");
		frm.txtcounty.focus();
		return false;
	}
	if(frm.txtpostcode.value=="")
	{
		alert("Please enter postalcode");
		frm.txtpostcode.focus();
		return false;
	}
	if(frm.txtphone.value=="")
	{
		alert("Please enter phone number");
		frm.txtphone.focus();
		return false;
	}
	if(frm.txtname.value=="")
	{
		alert("Please enter your name");
		frm.txtname.focus();
		return false;
	}
	if(frm.txtposition.value=="")
	{
		alert("Please enter your position");
		frm.txtposition.focus();
		return false;
	}
	if(frm.txtemail.value=="")
	{
		alert("Please enter email address");
		frm.txtemail.focus();
		return false;
	}
    var status=0;
	for(i=0;i<frm.businesstype.length;i++)
	{
		if(frm.businesstype[i].checked==true)
			status=1;
	}

	if(status=="0")
	{
		alert("Please select your business type ");
		frm.businesstype[0].focus();
		return false;
	}
	if(frm.businessactivity.value=="")
	{
		alert("Please enter business activity");
		frm.businessactivity.focus();
		return false;
	}
	if(frm.websitepurpose.value=="")
	{
		alert("Please enter purpose of website");
		frm.websitepurpose.focus();
		return false;
	}
}

function validate_frmaffiliate()
{
	frm=document.frmrequest;

	if(frm.txtcompany.value=="")
	{
		alert("Please enter company name");
		frm.txtcompany.focus();
		return false;
	}
	if(frm.txtaddress1.value=="")
	{
		alert("Please enter address1");
		frm.txtaddress1.focus();
		return false;
	}
	if(frm.txttown.value=="")
	{
		alert("Please enter town");
		frm.txttown.focus();
		return false;
	}
	if(frm.txtcounty.value=="")
	{
		alert("Please enter county");
		frm.txtcounty.focus();
		return false;
	}
	if(frm.txtpostcode.value=="")
	{
		alert("Please enter postalcode");
		frm.txtpostcode.focus();
		return false;
	}
	if(frm.txtphone.value=="")
	{
		alert("Please enter phone number");
		frm.txtphone.focus();
		return false;
	}
	if(frm.txtname.value=="")
	{
		alert("Please enter your name");
		frm.txtname.focus();
		return false;
	}
	if(frm.txtemail.value=="")
	{
		alert("Please enter email address");
		frm.txtemail.focus();
		return false;
	}
 }
