function hot1(){document.getElementById("tab1").className="doff";document.getElementById("tab2").className="h_tbn5";document.getElementById("fps").className="f_bgn2 g9 a2 bo ff bn1";document.getElementById("hps").className="hot_bg2 ff a2 bo bn1";}
function hot2(){document.getElementById("tab1").className="h_tbn5";document.getElementById("tab2").className="doff";document.getElementById("fps").className="f_bgn1 a2 bo bn1 ff";document.getElementById("hps").className="hot_bg1 ff g9 a2 bo bn1";}
function runnew(){ow=screen.width;if (ow >= 1024){document.getElementById('resonew').className="h_born1new";document.getElementById('services').className="h_ser1";}
if (ow <= 800){document.getElementById('resonew').className="h_born1new1";document.getElementById('services').className="h_ser2";}}
function resize_hw(Obj, h, w)
{
myImage = new Image();
myImage.src = Obj.src;
var height = myImage.height;
var width  = myImage.width;
if(height > h || width > w)
{
if(height > width)
{
var temp = height/h;
var new_width = width / temp;
new_width = parseInt(new_width);
height = h;
width = new_width;
}
else
{
var temp = width/w;
var new_height = height / temp;
new_height = parseInt(new_height);
height = new_height;
width = w;
}
}
Obj.height = height;
Obj.width = width;
}

function resize(Obj, image)
{
myImage = new Image();
myImage.src = image;
var height = myImage.height;
var width  = myImage.width;
if(height > 100 || width > 100)
{
if(height > width)
{
var temp = height/100;
var new_width = width / temp;
new_width = parseInt(new_width);
height = 100;
width = new_width;
}
else
{
var temp = width/100;
var new_height = height / temp;
new_height = parseInt(new_height);
height = new_height;
width = 100;
}
}
Obj.height = height;
Obj.width = width;
}
function CheckDataSearch(Form)
{
var str='';
Form.ss.value = Form.ss.value.replace(/^\s+/g, '').replace(/\s+$/g, '');
Form.ss.value = Form.ss.value.replace(/[^a-zA-Z0-9+ ]/g, ' ');
if (Form.ss.value.length < 3)
{
alert("Enter at least three characters for search.");
Form.ss.focus();
return false;
}
else
{
if(Form.searchfor.value == "comp")
{
var str1 = Form.ss.value.replace(/\+/g, ' ');
str1 = escape(str1.replace(/\s+/g, '+'));
str +='ss='+str1;
str = "http://dir.indiamart.com/cgi/compcatsearch.mp?"+str;
str = myReplace(str,"\\\\?\\\\&","?");
window.location = str;
return false;
}
else if(Form.searchfor.value == "product")
{
var str2 = Form.ss.value.replace(/\+/g, ' ');
str2 = escape(str2.replace(/\s+/g, '+'));
str +='ss='+str2;
str = "http://catalogs.indiamart.com/cgi/catprdsearch.mp?"+str;
str = myReplace(str,"\\\\?\\\\&","?");
window.location = str;
return false;
}
else if(Form.searchfor.value == "offer")
{
var str3 = Form.ss.value.replace(/\+/g, ' ');
str3 = escape(str3.replace(/\s+/g, '+'));
str +='search='+str3;
str = "http://trade.indiamart.com/search.mp?"+str;
str = myReplace(str,"\\\\?\\\\&","?");
window.location = str;
return false;
}
else if(Form.searchfor.value == "tenders")
{
var str4 = Form.ss.value.replace(/\+/g, ' ');
str4 = escape(str4.replace(/\s+/g, '+'));
str4 = str4.toLowerCase();
str +='ss='+str4;
//str += '&searchfor='+Form.searchfor.value;
//str +='&modid=TDR';
//str +='&cr=td';
//str +='&sr=1';
str = "http://tenders.indiamart.com/search.cgi?"+str;
str = myReplace(str,"\\\\?\\\\&","?");
window.location = str;
return false;
}
}
}
function myReplace(str, a, b) {
var re = new RegExp(a, "g");
var ret = str.replace(re,b);
return ret;
}
function Check_Login()
{
if(document.loginform.usr_name.value == "" ) {
alert("Kindly enter your User Name/E-mail ID.");
document.loginform.usr_name.focus();
return false;
}
else if(document.loginform.usr_name.value.length < 4) {
alert("The User Name should be atleast 4 characters long.");
document.loginform.usr_name.focus();
return false;
}
else if(document.loginform.usr_pass.value == "" ) {
alert("Kindly enter your Password.");
document.loginform.usr_pass.focus();
return false;
}
else if(document.loginform.usr_pass.value.length < 4) {
alert("The Password should be atleast 4 characters long.");
document.loginform.usr_pass.focus();
return false;
}
else {
return true;
}}
function validateit(theForm)
{
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theForm.email.value)))
{
alert("Invalid Email ID. Kindly enter the correct ID.");
theForm.email.focus();
return (false);
}}
function getblank(this1)  {
if (this1.value = "Your Email Here.") {
this1.value = "";
}
return true;
}
//use in newsletter
function openchild_nl(thisurl)
{
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;
if (condition == true  )
CanAnimate = true;
else
CanAnimate = false;
var email_val = document.theForm.email.value;
var from_site_val = document.theForm.from_site.value;
var is_window_val = document.theForm.is_window.value;
var org_referer = document.theForm.org_referer.value;
var thisurl_string = thisurl + "?email=" + email_val + "&from_site=" + from_site_val + "&is_window=" + is_window_val + "&org_referer=" + org_referer;
if ( CanAnimate ) {
msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=550,height=240,top=0,left=0');
msgWindow.focus();
msgWindow.location.href = thisurl_string;
}
else {
msgWindow=window.open( thisurl_string,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=550,height=240,top=0,left=0');
}
}
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;
if (condition == true  )
CanAnimate = true;
else
CanAnimate = false;
//use in trustseal on listing and thankyou
function openchild_ts(thisurl){
if ( CanAnimate ){
var windowHeight;
var windowWidth;
var windowTop;
var windowLeft;
windowHeight=(screen.height*(80/100))*0.85;
windowWidth=(screen.width*(57/100)-200);
windowTop=(screen.height*(20/100))*0.8;
windowLeft=screen.width*(40.2/100);
msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,top='+windowTop+',left='+windowLeft+',width='+windowWidth+',height='+windowHeight);
msgWindow.focus();
msgWindow.location.href = thisurl;
}
else{
msgWindow=window.open( thisurl,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=510,height=420');
}}
//for open vidio's
var win = null;
function NewWinIM(mypage,myname,compname)
{
var arr = mypage.split("/");
var comp_name =compname.replace(/\#/g,'\'');
var link_url = url.substr(0,30);
var link_url1 = url.substr(30,100);
var mix_url =''+link_url+'<br>'+link_url1+'';
var embedcode='';
if (mypage.search(/heavy\#\#/) != -1){
mypage = mypage.replace('heavy##','');
embedcode = '<div align="center"><object type="application/x-shockwave-flash" data="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" width="352" height="288" wmode="transparent"><param name="movie" value="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv"><param name="wmode" value="transparent"><embed  src="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" quality="high" bgcolor="#ffffff" width="352" height="288" name="movie" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object></div>';
}
else{
embedcode = '<DIV CLASS="sec-div"><embed src="http://www.4shared.com/flash/flvplayer.swf" style="width:400px;height:326px" bgcolor="#ffffff" allowscriptaccess="always" allowfullscreen="true" flashvars="file=http://dc152.4shared.com/img/'+arr[0]+'/'+arr[1]+'/dlink__2Fdownload_2F'+arr[0]+'_2F'+arr[1]+'_3Fdsid_3DJGITKOINJZHYGJIAJPJYHXISIQKIJFIVHXHZHYJIIZJBJPIWKSIRKQITIGJTIAGHGCIAHYJHINIQKVKU/preview.flv&image=http://dc152.4shared.com/img/'+arr[0]+'/'+arr[1]+'/'+arr[2]+'&autostart=true"></embed></div>';}
LeftPosition = (screen.width) ? (screen.width-400)/2 : 0;
TopPosition = (screen.height) ? (screen.height-326)/2 : 0;
var settings = 'width=440';
settings += ', height=366';
settings += ', top='+TopPosition+', left='+LeftPosition;
settings += ', directories=no';
settings += ', location=no';
settings += ', menubar=no';
settings += ', resizable=no';
settings += ', scrollbars=no';
settings += ', status=no';
settings += ', toolbar=no';
win = window.open("/",myname,settings);
win.document.write('<HTML><HEAD><TITLE>'+compname+' Video</TITLE></HEAD><BODY BGCOLOR="#000000"><DIV style="color:#FFFFFF;font-size:11px;font-family:arial" align="center">Video by '+compname+'</DIV>'+embedcode+'</BODY></HTML>');
}
function red(xid)
{document.getElementById(xid).className = "wh1";}
function blue(xid){document.getElementById(xid).className = "wh";}
function funcTextNewWindow(url){window.open(url);}
// Blowup Code /
var myWidth = 0, myHeight = 0;
function bhw()
{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 h = window.pageYOffset ||
document.body.scrollTop ||
document.documentElement.scrollTop;
var browserName=navigator.appName;
var imagedivheight=myHeight-60;
var test = myWidth*24/100;
var divwidth = myWidth-test;
var widthformizilla = myWidth-538;
var mozillawidth = widthformizilla-divwidth;
var iewidth = myWidth-516;
var mozillawidth1 = mozillawidth/2;
var iewidth1 = iewidth/2;
var mtop = h+7;
var aboveheight = myHeight-584;
var aboveheight1 = aboveheight/2+h;
document.getElementById('divscroll').style.height="500px";
document.getElementById('divscroll').style.width="504px";
document.getElementById('blwtbl').style.height="478px";
document.getElementById('message2').style.top=aboveheight1+'px';
document.getElementById('message2').style.left=iewidth1+'px';
document.getElementById('divscroll').name="miniwin";
if (myHeight <= 586)
{
document.getElementById('divscroll').style.height=imagedivheight+'px';
document.getElementById('divscroll').style.width="522px";
document.getElementById('blwtbl').style.height=imagedivheight+'px';
document.getElementById('message2').style.top=mtop+'px';
}}
function max(){
var imagedivheightnew=myHeight-60;
var imagedivwidthnew=myWidth-212;
var imagedivheightnew1=myHeight-94;
var h = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
var browserName=navigator.appName;
var mtop = h+7;
if (document.getElementById('divscroll').name=="miniwin")
{
document.getElementById('message2').style.left="100px";
document.getElementById('message2').style.top=mtop+'px';
document.getElementById('divscroll').style.width=imagedivwidthnew+'px';
document.getElementById('divscroll').style.height=imagedivheightnew+'px';
document.getElementById('blwtbl').style.height=imagedivheightnew1+'px';
document.getElementById('divscroll').name="maxwin";
document.getElementById('mx').className="soff";
document.getElementById('mx1').className="don";}
else
{
document.getElementById('mx').className="don";
document.getElementById('mx1').className="soff";
bhw();
}}
function blowup_show(){document.getElementById('message2').className="don";bhw();}
function blowup_off(){document.getElementById('message2').className="soff";}
var path = '';
var imgid = "0";
function imageset(id,img_path)
{
var nAgt = navigator.userAgent;
var patt = /Opera/;
if(patt.test(nAgt))
{
document.getElementById('loadimg').className="soff";
document.getElementById('imagediv').className="don";
}
else
{
document.getElementById('loadimg').className="don";
document.getElementById('imagediv').className="soff";
}

path = img_path;
imgid = id;
var pic = document.getElementById(imgid);
productName =pic.alt;
productName = unescape(productName);
if(productName.length > 40)
{
var c = productName.substring(0,40);
c = c + "...";
productName = c;
}
document.getElementById('imagediv').innerHTML='<img src="'+path+'" onload="loadimg()" id="bigimg">';
document.getElementById('prname').innerHTML=productName;
document.getElementById('mx').className="don";
document.getElementById('mx1').className="soff";}
function loadimg()
{
document.getElementById('loadimg').className="soff";
document.getElementById('imagediv').className="don";}

document.write('<DIV ID="message2" STYLE="position: absolute; top: 0px; left: 0px; z-index: 2000;" ALIGN="center" class="soff"><TABLE ID="tableheight" ALIGN="center" BORDER="1" CELLPADDING="0" CELLSPACING="0"><TR><TD ALIGN="center"><TABLE CLASS="bgclor"  BORDER="0" CELLPADDING="0" CELLSPACING="0" width="100%"><TR><TD ALIGN="center"><TABLE CLASS="main1" ALIGN="center" BORDER="0" CELLPADDING="0"  CELLSPACING="0" WIDTH="100%" HEIGHT="35" ><TR><TD ID="titleBar"  STYLE="cursor:move"><ILAYER WIDTH="100%" ONSELECTSTART="return false"> </ILAYER><LAYER WIDTH="100%" ONMOUSEOVER="isHot=true;if (isN4) ddN4(message2)" ONMOUSEOUT="isHot=false"><DIV ID="prname" CLASS="pr-txt"></DIV></LAYER></TD><TD ALIGN="right" STYLE="padding-right:0px;" WIDTH="100"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD><IMG SRC="http://ctl.imimg.com/gifs/max1.gif" id="mx" WIDTH="21" HEIGHT="21" STYLE="cursor:pointer" ONCLICK="max()" HSPACE="3"></TD><TD><IMG SRC="http://ctl.imimg.com/gifs/max.gif" id="mx1" WIDTH="21" HEIGHT="21" STYLE="cursor:pointer;" class="soff" ONCLICK="max()" HSPACE="3"></TD><TD><IMG SRC="http://ctl.imimg.com/gifs/cl.gif" WIDTH="21" HEIGHT="21" ONCLICK="blowup_off()" STYLE="cursor:pointer"></TD></TR></TABLE></TD></TR></TABLE><DIV STYLE="height: 500px; width: 504px;" CLASS="image_div" ID="divscroll" ALIGN="center"><TABLE ID="blwtbl" ALIGN="center" BGCOLOR="#ffffff" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR><TD ALIGN="center"><DIV ID="loadimg" STYLE="font-family: arial; font-size: 15px;" class="don"><IMG SRC="http://ctl.imimg.com/gifs/indicator-new.gif"><BR><BR>Loading...</DIV><DIV ID="imagediv" class="soff"></DIV></TD></TR></TABLE></DIV></TD></TR></TABLE></TD></TR></TABLE></DIV>');


isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.message2 : document.getElementById("message2");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;}}
function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx+'px';
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety+'px';
return false;}
function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;}}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}}
function hideMe(){
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.message2.visibility="hide";}
function showMe(){
if (isIE||isNN) whichDog.style.visibility="visible";
else if (isN4) document.message2.visibility="show";}
document.body.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
// End of blowup///
var myWidth1 = 0,myHeight1=0;
function source(){
if(typeof(window.innerWidth)=='number'){myWidth1=window.innerWidth;myHeight1=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth1=document.documentElement.clientWidth;myHeight1=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth1=document.body.clientWidth;myHeight1=document.body.clientHeight;}var h=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;
var browserName=navigator.appName;if (document.getElementById('sourcediv')){var intElemScrollHeight=document.getElementById('hdiv').scrollHeight; var abc=document.getElementsByTagName('body')[0].scrollHeight;var abc1=abc-630;var newh=intElemScrollHeight+145;var s=intElemScrollHeight+145+254;var newhn=intElemScrollHeight+145+h;if(document.getElementById('sourcediv').className=="soff"){document.getElementById('sourcediv').style.marginTop=newh+"px";document.getElementById('sourcediv').className="bgs nr bn1";} if(newh<h||abc1>h){document.getElementById('sourcediv').style.marginTop=h+"px";if(abc1<h){document.getElementById('sourcediv').style.marginTop=abc1+"px";}if(newh>h)	{	document.getElementById('sourcediv').style.marginTop=newh+"px";	}}}}
function cls(){document.getElementById('sourcediv').className="soff1";}
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, 'scroll', source);
addEvent(window, 'resize', source);
function qry(cid, ctg, comp, city, state, prd, mcat, ss){location.href='http://catalogs.indiamart.com/cgi/query-form.mp?cid='+cid+'&modid=CTL&ctg='+109+'&from=catalogs&comp='+comp+'&city='+city+'&state='+state+'&country=India&PRODUCTS='+prd+'&mcat='+mcat+'&ss='+ss;}



var flag1 = 1;
var flag2 = 1;
var flag3 = 1;
function setimg()
{
if(document.getElementById('w0'))
{

var abc = myImg.length;
var abcn = abc-21;
var abc1, abc2;
if (abc < 20)
{
abc2 = abc;
}
else
{
abc2 = 20;
}
if (abc < 10)
{
abc1 = abc;
}
else
{
abc1 = 10;
}

var hs = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
if(700 < hs && hs < 1400 && flag1 == 1)
{
var i=0;
for (i=0;i<=abc1-1;i++)
{
document.getElementById("w"+i).innerHTML= unescape(myImg[i]);
}
flag1++;
}
else if(1400 < hs && hs < 2000 && flag2 == 1)
{
var i=abc1;
for (i=abc1;i<=abc2-1;i++)
{
document.getElementById("w"+i).innerHTML= unescape(myImg[i]);
//alert("2");
}
flag2++;
}
else if(2000 < hs  && flag3 == 1)
{
var i=abc2;
for (i=abc2;i<=abc-1;i++)
{
document.getElementById("w"+i).innerHTML= unescape(myImg[i]);
}

for (i=0;i<=abc1-1;i++)
{
document.getElementById("w"+i).innerHTML=unescape(myImg[i]);
}

for (i=abc1;i<=abc2-1;i++)
{
document.getElementById("w"+i).innerHTML= unescape(myImg[i]);
//alert("2");
}
flag3++;
}
}
}

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, 'scroll', setimg);


document.write('<style>.bgs2{width:259px;height:235px;background-image: url(http://ctl.imimg.com/gifs/bgsourcing1.gif);background-repeat:no-repeat;}.fshnn{font-family:arial;font-size:21px;padding:10px 0 5px 20px;line-height:22px}.fsh1nn{clear:right;font-family:arial;font-size:12px;color:#000000;line-height:18px;padding:17px 0 0 30px;}.stil{width:100%;font-family:arial;border:1px solid #e69623;background:#ffffdb;padding:4px 0 10px 0;}.stil p{font-size:15px;margin:0px;padding:2px 0 0 8px;}.stil p b{font-size:22px;color:#b50000;}.stil a{font-size:18px;color:#0000FF;}.fsh2{font-family:arial;font-size:12px;padding-left:21px;color:#646464;padding-bottom:2px;}.fsh3 {font-family:arial;font-size:17px;padding-top:6px;padding-left:30px;color:#FFFFFF;line-height:19px;font-weight:bold;} .fsh3 a{color:#FFFFFF;text-decoration:none;} .fsh3 a:hover{color:#FFFFFF;text-decoration:none;}.pd{padding-left:5px}.ht{height:30px}</style>');
