
function check_advanced_search(kw)  {
  error = 0;
  if (kw.length < 3) {
    error_message = "Please enter atleast 3 characters for search";
    error = 1;
  }

  if (error == 1) {
    alert(error_message);
    return false;
  } else {
    return true;
  }
}






function chrom()
{

if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
   myWidth = document.body.clientWidth;
   myHeight = document.body.clientHeight;
  }


var nAgt = navigator.userAgent;
var patt = /Chrome/;


if(document.getElementById('dw1') && patt.test(nAgt))
{
if (myWidth >= 1250)
{
document.getElementById('dw1').style.marginLeft="65px";
document.getElementById('dw2').style.marginLeft="65px";
document.getElementById('r3').style.marginLeft="65px";
document.getElementById('r4').style.marginLeft="65px";
}

if (myWidth >= 1128  && myWidth < 1250)
{
document.getElementById('dw1').style.marginLeft="55px";
document.getElementById('dw2').style.marginLeft="55px";
document.getElementById('r3').style.marginLeft="55px";
document.getElementById('r4').style.marginLeft="55px";
}


if (myWidth >= 1000 && myWidth < 1128)
{
document.getElementById('dw1').style.marginLeft="35px";
document.getElementById('dw2').style.marginLeft="35px";
document.getElementById('r3').style.marginLeft="35px";
document.getElementById('r4').style.marginLeft="35px";
}


if (myWidth >= 800 && myWidth < 1000)
{
document.getElementById('dw1').style.marginLeft="20px";
document.getElementById('dw2').style.marginLeft="20px";
document.getElementById('r3').style.marginLeft="20px";
document.getElementById('r4').style.marginLeft="20px";
}

}
}

function addEvent( obj, type, fn ){ 
   if (obj.addEventListener){ 
	  obj.addEventListener( type, fn, false );
   }
   else if (obj.attachEvent){ 
	  obj["e"+type+fn] = fn; 
	  obj[type+fn] = function(){ obj["e"+type+fn]( window.event ); } 
	  obj.attachEvent( "on"+type, obj[type+fn] ); 
   } 

}

addEvent(window, 'load', chrom);
addEvent(window, 'resize', chrom);