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-630;







var newh = intElemScrollHeight+380;
var s = intElemScrollHeight+380+254;



var newhn = intElemScrollHeight+380+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 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);


document.write('<DIV ID="sourcediv" CLASS="soff"><DIV CLASS="fsh">Free Sourcing Help Desk</DIV><DIV CLASS="fsh1">Sourcing Products from India?<BR><B>Tell suppliers exactly what you need</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="fsh4">Receive quotes only from genuine and pre-verified suppliers</DIV><div class="s_close"><a href="javascript:cls()">[X] <u>Close</u></a></div></DIV>')