var myWidth = 0, myHeight = 0;


function source() 
{

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 intElemScrollHeight = document.getElementById('hdiv').scrollHeight;

var abc = document.getElementsByTagName('body')[0].scrollHeight;
var abc1 = abc-645;


if(googlecount =="10")
{
var newh = intElemScrollHeight+152;
var s = intElemScrollHeight+152+254;
}

else
	{
var newh = intElemScrollHeight+380;
var s = intElemScrollHeight+380+254;
	}





var newhn = intElemScrollHeight+152+h;


if (document.getElementById('sourcediv').className=="soff")
{
	document.getElementById('sourcediv').style.marginTop = newh+"px";
document.getElementById('sourcediv').className="bgsourcing";
}



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 fix()
{
var intElemScrollHeight = document.getElementById('hdivnew').scrollHeight;
var abc = document.getElementsByTagName('body')[0].scrollHeight;

var a = intElemScrollHeight+170+360+250;

var divh= intElemScrollHeight+250;


if (abc < a)
{
document.getElementById('hdivnew').style.height=divh+"px";
}

}



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);
addEvent(window, 'load', fix);


document.write('<DIV ID="sourcediv" CLASS="soff"><DIV CLASS="fsh">Buyers Sourcing Helpdesk</DIV><DIV CLASS="fsh1">Find qualified suppliers.<BR><B>Send us your purchase requirement and receive response only from qualified and genuine suppliers.</B></DIV><DIV CLASS="fsh2">Click here to:</DIV> <DIV CLASS="fsh3"><A HREF="http://my.indiamart.com/cgi/eto-post-offer-new.mp?modid=MY">Post your purchase / <BR>sourcing requirements </A></DIV><div class="s_close"><a href="javascript:cls()">[X] <u>Close</u></a></div></DIV>')
