// JavaScript Document
var bgsleight	= function() {
	
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}
	
	function fnLoadPngs() {
		var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
		var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
		for (var i = document.all.length - 1, obj = null; (obj = document.all[i]); i--) {
			if (itsAllGood && obj.currentStyle.backgroundImage.match(/\.png/i) != null) {
				fnFixPng(obj);
				obj.attachEvent("onpropertychange", fnPropertyChanged);
			}
		}
	}

	function fnPropertyChanged() {
		if (window.event.propertyName == "style.backgroundImage") {
			var el = window.event.srcElement;
			if (!el.currentStyle.backgroundImage.match(/x\.gif/i)) {
				var bg	= el.currentStyle.backgroundImage;
				var src = bg.substring(5,bg.length-2);
				el.filters.item(0).src = src;
				el.style.backgroundImage = "url(x.gif)";
			}
		}
	}

	function fnFixPng(obj) {
		var bg	= obj.currentStyle.backgroundImage;
		var src = bg.substring(5,bg.length-2);
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
		obj.style.backgroundImage = "url(x.gif)";
	}
	
	
	
	
	return {
		
		init: function() {
			
			if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
				addLoadEvent(fnLoadPngs);
			}
			
		}
	}
	
}();

bgsleight.init();

<!--
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
//-->
function valid()
{
	if (document.contactus.name.value == "") {
		alert("Fill the  Name field.");
		document.contactus.name.focus();
		return;
	}
	if (document.contactus.em.value == "") {
		alert("Fill the Email field.");
		document.contactus.em.focus();
		return;
	} 
	if ( document.contactus.em.value.indexOf ('@', 0) == -1 || document.contactus.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.contactus.em.focus();
		  return;
        }
		if (document.contactus.message.value == "") {
		alert("Fill the  Message field.");
		document.contactus.message.focus();
		return;
	}
		else {
		document.contactus.submit();
	}
}
function reset1()
{
	document.contactus.reset();
}
function valid2()
{
	if (document.crvs.message.value == "") {
		alert("Fill the  Message field.");
		document.crvs.message.focus();
		return;
	}
	if (document.crvs.em.value == "") {
		alert("Fill the Email field.");
		document.crvs.em.focus();
		return;
	} 
	if ( document.crvs.em.value.indexOf ('@', 0) == -1 || document.crvs.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.crvs.em.focus();
		  return;
        }
	
		else {
		document.crvs.submit();
	}
}

function valid3()
{
	if (document.ts.fn.value == "") {
		alert("Fill the  First Name field.");
		document.ts.fn.focus();
		return;
	}
if (document.ts.lan.value == "") {
		alert("Fill the  Last Name field.");
		document.ts.lan.focus();
		return;
	}
	if (document.ts.em.value == "") {
		alert("Fill the Email field.");
		document.ts.em.focus();
		return;
	} 
	if ( document.ts.em.value.indexOf ('@', 0) == -1 || document.ts.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.ts.em.focus();
		  return;
        }
		if (document.ts.product.value == "") {
		alert("Fill the  Product field.");
		document.ts.product.focus();
		return;
	}
	if (document.ts.brandName.value == "") {
		alert("Fill the  Brand Name field.");
		document.ts.brandName.focus();
		return;
	}
		if (document.ts.num.value == "") {
		alert("Fill the  Model Number field.");
		document.ts.num.focus();
		return;
	}
	if (document.ts.tscomm.value == "") {
		alert("Fill the Comments field.");
		document.ts.tscomm.focus();
		return;
	}	else {
		document.ts.submit();
	}
}
function emValid()
{
	if (document.mailinglist.jointmail.value == "") {
		alert("Fill the Email field.");
		document.mailinglist.jointmail.focus();
		return;
	} 
	if ( document.mailinglist.jointmail.value.indexOf ('@', 0) == -1 || document.mailinglist.jointmail.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.mailinglist.jointmail.focus();
		  return;
        }
	
		else {
		document.mailinglist.submit();
	}
}
function valid4()
{
	if (document.maillist.name.value == "") {
		alert("Fill the  Name field.");
		document.maillist.name.focus();
		return;
	}
	if (document.maillist.em.value == "") {
		alert("Fill the Email field.");
		document.maillist.em.focus();
		return;
	} 
	if ( document.maillist.em.value.indexOf ('@', 0) == -1 || document.maillist.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.maillist.em.focus();
		  return;
        }
		if (document.maillist.Country.value == "") {
		alert("Fill the Country  field.");
		document.maillist.Country.focus();
		return;
	}
		else {
		document.maillist.submit();
	}
}
function validc()
{
	
	if (document.career.name.value == "") {
		alert("Fill the  First Name field.");
		document.career.name.focus();
		return;
	}
	if (document.career.em.value == "") {
		alert("Fill the Email field.");
		document.career.em.focus();
		return;
	} 
	if ( document.career.em.value.indexOf ('@', 0) == -1 || document.career.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.career.em.focus();
		  return;
        }
		if (document.career.Phone.value == "") {
		alert("Fill the  Phone field.");
		document.career.Phone.focus();
		return;
	}
	var i=0
	for (i=0;i<=3;i++){
		var x= eval(document.career.category[i].checked );
		if(x==true){
			break;
		}
		if(i==3){
			alert("Please Select Category");
			return;
		}
	}
	
	if(document.getElementById('btn1').checked == false) {
		if(document.getElementById('btn2').checked == false) {
		alert("Select job type");
		document.career.button.focus();
		return;
		}
	}
		if (document.career.sal.value == "") {
		alert("Fill salary");
		document.career.sal.focus();
		return;
	}
		if (document.career.resume.value == "") {
		alert("Attach Resume");
		document.career.resume.focus();
		return;
	}
	else {
		document.career.submit();
	}
}
function validpass()
{
	if (document.password.name.value == "") {
		alert("Fill the  Name field.");
		document.password.name.focus();
		return;
	}
	if (document.password.em.value == "") {
		alert("Fill the Email field.");
		document.password.em.focus();
		return;
	} 
	if ( document.password.em.value.indexOf ('@', 0) == -1 || document.password.em.value.indexOf ('.', 0) == -1 ) {
		  alert("Please enter a valid e-mail");
          document.password.em.focus();
		  return;
        }
		else {
		document.password.submit();
	}
}
function validpass2()
{
	if (document.signin.name.value == "") {
		alert("Fill the  Name field.");
		document.signin.name.focus();
		return;
	}
	if (document.signin.pass.value == "") {
		alert("Fill the Password field.");
		document.signin.pass.focus();
		return;
	} 
		else {
		document.signin.submit();
	}
}
function validram()
{
	/*alert("Fill the  Name field.");*/
	if (document.RMA.reference.value == "") {
		alert("Fill the  Name field.");
		document.RMA.reference.focus();
		return;
	}
		else {
		document.RMA.submit();
	}
}


/**
 * function for 1 2 3 4 tabs
 */
var Old_tab = new Array();

function tabs1234 (tabId, seqId)
{
	if (Old_tab[seqId-1] != tabId) {
		
		/**
		 * Hide previous selected TAB
		 */
		if (Old_tab[seqId-1]) {
			var Sub = document.getElementById(Old_tab[seqId-1]+"_sub");
			Sub.style.display = "none"; 			
			//document.getElementById(Old_tab[seqId-1]).style.background="#d4d4d4";
			document.getElementById(Old_tab[seqId-1]).className ="ul123"; 
		}
		
		/**
		 * Show selected TAB
		 */
		var Sub = document.getElementById(tabId+"_sub");
		Sub.style.display = "";
		//document.getElementById(tabId).style.background="#f78f1e";
		document.getElementById(tabId).className ="ul123on"; 
		
		/**
		 * Assign new IDs to the OLD_ variables
		 */
		Old_tab[seqId-1]	= tabId;
	}
}
function validsurvey()
{
	var i=0
	for (i=0;i<=1;i++){
		var x= eval(document.survey.location[i].checked );
		if(x==true){
			break;
		}
		if(i==1){
			alert("How/Where did you puchase the product?");
			return;
		}
	}
	if (document.survey.numberoftimes.value == "") {
		alert("How many times have you purchased from TechnoMania before?");
		document.survey.numberoftimes.focus();
		return;
	}
	if (document.survey.comment.value == "") {
		alert("Please enter your name & any comments");
		document.survey.comment.focus();
		return;
	}
	else {
		document.survey.submit();
	}
}