function searchCheck()
	{
		var str = '';

		if (document.frm.ss.value=='' || document.frm.ss.value=='Enter Search Keyword...')	{
			alert("Please enter some keyword to search.");
			document.frm.ss.focus();
            document.frm.ss.value='';
			return false;
		}

		if (document.frm.ss.value.length < 3) {
            alert("Please Enter atleast 3 character");
            document.frm.ss.focus();
            return false;
        }

        if (document.frm.ss.value) {
	var str1;
	str1 = document.frm.ss.value.replace(/^\s+/g, '').replace(/\s+$/g, '');
	str1 = str1.replace(/[^a-zA-Z0-9+ ]/g, ' ');
	str1 = str1.replace(/\+/g, ' ');
	str1 = str1.replace(/\s+/g, '+');
	str += 'ss='+str1;
window.location = "http://www.hammocks-manufacturer.com/search.html?"+str;
return false;
	}
	}

	function searchClear()
	{
		if (document.frm.ss.value=='Enter Search Keyword...')	{
			document.frm.ss.value='';
		}
	}

    function settext()
    {
        if (document.frm.ss.value=='')  {
            document.frm.ss.value='Enter Search Keyword...';
        }
    }

    function settextvalue()
    {
        document.frm.ss.value='Enter Search Keyword...';
    }

	function getDwsCookie(Name)
	{
		var search = Name + "="
		if (document.cookie.length > 0)
		{ // if there are any cookies
			offset = document.cookie.indexOf(search)
			if (offset != -1)
			{ // if cookie exists
				offset += search.length
				// set index of beginning of value
				end = document.cookie.indexOf(";", offset)
				// set index of end of cookie value
				if (end == -1) end = document.cookie.length
				return unescape(document.cookie.substring(offset, end))
			}
		}

		return "";
	}


	function setDwsCookie(name, value)
	{
		expires = new Date();
		expires.setTime (expires.getTime() + 24 * 60 * 60 * 150 * 1000);

		if (value.length > 0)
		document.cookie = name + "=" + escape(value)+ ";"+"expires=" + expires.toGMTString() + ";";

	}


function showTradeOfferLink()
{
  if( (cookie = getDwsCookie("ETO_OFFERS")) > "")
	{
		if(cookie != "")
		{
			document.write(' | <a href="tradeoffers.html">Trade Offers ('+cookie+')</a>');
		}
	}
	else
	{
		var surl = "http://www.media4trade.com/tradeofferserver?id=185499&setcookie=1&disp=link";
		document.write('<scr' + 'ipt language="javascript"' + ' src="' + surl + '"></scr' + 'ipt>');
	}
  }

function showTradeOfferLink1()
{
  if( (cookie = getDwsCookie("ETO_OFFERS")) > "")
   {
      if(cookie != "")
      {
         document.write('<LI><B><a href="tradeoffers.html">Trade Offers ('+cookie+')</a></B></LI>');
      }
   }
   else
   {
      var surl = "http://www.media4trade.com/tradeofferserver?id=185499&setcookie=1&disp=link";
      document.write('<scr' + 'ipt language="javascript"' + ' src="' + surl + '"></scr' + 'ipt>');
   }
  }

function showTradeOfferCount()
{
	if( (cookie = getDwsCookie("ETO_OFFERS")) > "")
	{
		if(cookie != "")
		{
			document.write(' ('+cookie+')');
		}
	}
}

function showTradeOfferLink2()
{
	document.write(' | <a href="tradeoffers.html">Trade Offers</a>');
}

var persistmenu="yes" //"yes" or "no". Make sure each DIV content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.sub{display: none;}\n')
document.write('.tbq{display: none;}\n')
document.write('.la{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("div"); //DynamicDrive.com change
		if(el.style.display != "inline"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="tbq") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "inline";
		}
	}
}

function SwitchMenu1(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv1").getElementsByTagName("div"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="sub") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";}
			else{
			el.style.display = "none";
		}
	}
}

function SwitchMenu2(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv2").getElementsByTagName("div"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="la") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";}
			else{
			el.style.display = "none";
		}
	}
}

function SwitchMenu3(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv3").getElementsByTagName("div"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="sub1") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";}
			else{
			el.style.display = "none";
		}
	}
}

//-----------------------------------mouse over effect--------------------------------------
function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}



var preloadFlag = false;
function preloadImages() {
    if (document.images) {
index_1 = newImage("http://imghost1.indiamart.com/data2/YM/PP/MY-185499/fabric-250x250.jpg");
index_2 = newImage("http://imghost1.indiamart.com/data2/DD/FU/MY-185499/hammock-250x250.jpg");
index_3 = newImage("http://imghost1.indiamart.com/data2/XV/GM/MY-185499/rope-250x250.jpg");
index_4 = newImage("http://imghost1.indiamart.com/data2/HK/LU/MY-185499/hammock1-250x250.jpg");
index_5 = newImage("http://imghost1.indiamart.com/data2/SS/TC/MY-185499/outdoor-250x250.jpg");
index_6 = newImage("http://imghost1.indiamart.com/data2/SC/QO/MY-185499/hammock2-250x250.jpg");
index_7 = newImage("http://imghost1.indiamart.com/data2/VT/BR/MY-185499/hammock3-250x250.jpg");
index_8 = newImage("http://imghost1.indiamart.com/data2/KO/JM/MY-185499/soft-250x250.jpg");
index_9 = newImage("http://imghost1.indiamart.com/data2/ON/RJ/MY-185499/quilted-250x250.jpg");
index_10 = newImage("http://imghost1.indiamart.com/data2/QQ/FM/MY-185499/cyperess-250x250.jpg");
index_11 = newImage("http://imghost.indiamart.com/data/Y/K/MY-185499/Untitled-3_250x250.jpg");
index_12 = newImage("http://imghost.indiamart.com/data/K/A/MY-185499/DD_250x250.jpg");
index_13 = newImage("http://imghost.indiamart.com/data/6/C/MY-185499/textelinefabric_250x250.jpg");
index_14 = newImage("http://imghost.indiamart.com/data/4/X/MY-185499/DFH3611S_250x250.jpg");
index_15 = newImage("http://imghost.indiamart.com/data/T/M/MY-185499/cottonfabrichammock1_250x250.jpg");
index_16 = newImage("http://imghost.indiamart.com/data/V/F/MY-185499/Untitled-1_250x250.jpg");
index_17 = newImage("http://imghost.indiamart.com/data/7/N/MY-185499/cotton_250x250.jpg");
index_18 = newImage("http://imghost.indiamart.com/data/5/I/MY-185499/EE_250x250.jpg");
index_19 = newImage("http://imghost.indiamart.com/data/8/T/MY-185499/wheelkit_250x250.jpg");
index_20 = newImage("http://imghost.indiamart.com/data/H/K/MY-185499/portabledressing_250x250.jpg");
index_21 = newImage("http://imghost.indiamart.com/data/4/D/MY-185499/G_250x250.jpg");
index_22 = newImage("http://imghost.indiamart.com/data/U/U/MY-185499/beachmatblanket_250x250.jpg");
index_23 = newImage("http://imghost.indiamart.com/data/X/L/MY-185499/hardwarekit_250x250.jpg");
index_24 = newImage("http://imghost.indiamart.com/data/X/V/MY-185499/cottonrope_250x250.jpg");
index_25 = newImage("http://imghost.indiamart.com/data/1/0/MY-185499/polyesterrope_250x250.jpg");
index_26 = newImage("http://imghost.indiamart.com/data/2/M/MY-185499/colourpolyester_250x250.jpg");
index_27 = newImage("http://imghost.indiamart.com/data/V/S/MY-185499/cottonrope1_250x250.jpg");
index_28 = newImage("http://imghost.indiamart.com/data/B/K/MY-185499/singlerope_250x250.jpg");
index_29 = newImage("http://imghost.indiamart.com/data/K/3/MY-185499/singlequilted_250x250.jpg");
index_30 = newImage("http://imghost.indiamart.com/data/Y/0/MY-185499/softcomb1_250x250.jpg");
index_31 = newImage("http://imghost.indiamart.com/data/K/O/MY-185499/2pointstand_250x250.jpg");
index_32 = newImage("http://imghost.indiamart.com/data/K/S/MY-185499/cotton1_250x250.jpg");
index_33 = newImage("http://imghost.indiamart.com/data/J/5/MY-185499/polyesterrope1_250x250.jpg");
index_34 = newImage("http://imghost.indiamart.com/data/I/2/MY-185499/greenpolyester_250x250.jpg");
index_35 = newImage("http://imghost.indiamart.com/data/G/Y/MY-185499/2pointstand1_250x250.jpg");
index_36 = newImage("http://imghost.indiamart.com/data/8/M/MY-185499/DDD_250x250.jpg");
index_37 = newImage("http://imghost.indiamart.com/data/X/R/MY-185499/directorchair_250x250.jpg");
index_38 = newImage("http://imghost.indiamart.com/data/K/P/MY-185499/rockingchair_250x250.jpg");
index_39 = newImage("http://imghost.indiamart.com/data/C/P/MY-185499/deckchairs_250x250.jpg");
index_40 = newImage("http://imghost.indiamart.com/data/B/C/MY-185499/patiocushion_250x250.jpg");
index_41 = newImage("http://imghost.indiamart.com/data/Q/C/MY-185499/Y_250x250.jpg");
index_42 = newImage("http://imghost.indiamart.com/data/W/V/MY-185499/15ft_250x250.jpg");
index_43 = newImage("http://imghost.indiamart.com/data/R/1/MY-185499/13ft_250x250.jpg");
index_44 = newImage("http://imghost.indiamart.com/data/X/Q/MY-185499/13ft2point_250x250.jpg");
index_45 = newImage("http://imghost.indiamart.com/data/O/3/MY-185499/15ftamerican_250x250.jpg");
index_46 = newImage("http://imghost.indiamart.com/data/T/7/MY-185499/15ftteak_250x250.jpg");
index_47 = newImage("http://imghost.indiamart.com/data/N/P/MY-185499/cottonropeswing_250x250.jpg");
index_48 = newImage("http://imghost.indiamart.com/data/6/9/MY-185499/cottonfabric1_250x250.jpg");
index_49 = newImage("http://imghost.indiamart.com/data/8/S/MY-185499/polyestersoft_250x250.jpg");
index_50 = newImage("http://imghost.indiamart.com/data/9/N/MY-185499/porchswing_250x250.jpg");
index_51 = newImage("http://imghost.indiamart.com/data/Z/4/MY-185499/polyesterswing_250x250.jpg");
index_52 = newImage("http://imghost.indiamart.com/data/B/N/MY-185499/porchswing1_250x250.jpg");
index_53 = newImage("http://imghost.indiamart.com/data/J/U/MY-185499/quiltedhammock_250x250.jpg");
index_54 = newImage("http://imghost.indiamart.com/data/J/B/MY-185499/softcomb2_250x250.jpg");
index_55 = newImage("http://imghost.indiamart.com/data/A/9/MY-185499/quiltedammock_250x250.jpg");
index_56 = newImage("http://imghost.indiamart.com/data/Y/8/MY-185499/softcomb3_250x250.jpg");
index_57 = newImage("http://imghost.indiamart.com/data/V/C/MY-185499/textelinefabric1_250x250.jpg");
index_58 = newImage("http://imghost.indiamart.com/data/Y/I/MY-185499/textelinefabric2_250x250.jpg");
index_59 = newImage("http://imghost.indiamart.com/data/9/X/MY-185499/textelinefabric3_250x250.jpg");
index_60 = newImage("http://imghost.indiamart.com/data/N/T/MY-185499/O_250x250.jpg");
index_61 = newImage("ts/lnkb1.gif");
index_62 = newImage("ts/tlb1.gif");
index_63 = newImage("ts/on1.gif");
index_64 = newImage("ts/off1.gif");
index_65 = newImage("ts/yahoo1.png");
index_66 = newImage("ts/msn1.png");
index_67 = newImage("ts/skype1.png");
index_68 = newImage("ts/google1.png");
preloadFlag = true;
}
}


//---------------------------dynamiclayout effect---------------------------------

function getBrowserWidth(){
		if (window.innerWidth){
			return window.innerWidth;}
		else if (document.documentElement && document.documentElement.clientWidth != 0){
			return document.documentElement.clientWidth;	}
		else if (document.body){return document.body.clientWidth;}
			return 0;
	}

// dynamicLayout
function dynamicLayout(){
	var browserWidth = getBrowserWidth();

	//Load Wider CSS Rules
	if (browserWidth > 1024){
		changeLayout("above1024");
	}
}

// changeLayout is based on setActiveStyleSheet function

function changeLayout(description){
	var i, a;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
		if(a.getAttribute("title") != "default"){
			a.disabled = true;

		}
   }

	for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
		if(a.getAttribute("title") == description){
			a.disabled = false;

		}
   }
}

//addEvent()
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] );
   }
}

//Run dynamicLayout function when page loads and when it resizes.
addEvent(window, 'load', dynamicLayout);
addEvent(window, 'resize', dynamicLayout);

function openchild(sPicURL,h,w)
{
	window.open(sPicURL, 'Lookup', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width='+w+',height='+h+'');
}
//*new-cart*/
/* for text value start*/
function RegValue(FieldName) {

if(FieldName.value == 'First Name' || FieldName.value == 'Your Name' )
{
FieldName.value = '';
FieldName.className='txtf';
}
else
{
FieldName.className='txtf';
}
}
function RegValue1(FieldName) {

if(FieldName.value == '')
{
FieldName.value = 'First Name';
FieldName.className='txtfa';
}
else
{
FieldName.className='txtf';
}
}
function RegValue2(FieldName) {

if(FieldName.value == '')
{
FieldName.value = 'Your Name';
FieldName.className='txtfa';
}
else
{
FieldName.className='txtf';
}
}
function RegeValue2(FieldName) {

	if(FieldName.value == 'Last Name')
	{
	FieldName.value = '';
	FieldName.className='txtf';
	}
	else
	{
	FieldName.className='txtf';
	}
}
function RegeValue3(FieldName) {

	if(FieldName.value == '')
	{
	FieldName.value = 'Last Name';
	FieldName.className='txtfa';
	}
}

function AriaValue(FieldName)
{
	if(FieldName.value == 'Area Code')
	{
		FieldName.value = '';
		FieldName.className='txtf';
	}
	else
	{
 		FieldName.className='txtf';
	}
}
function AriaValue1(FieldName)
{
	if(FieldName.value == '')
	{
		FieldName.value = 'Area Code';
		FieldName.className='txtfa';
	}
	else
	{
		FieldName.className='txtf';
	}
}


function PhonValue(FieldName) {
	if(FieldName.value == 'Phone Number')
	{
		FieldName.value = '';
		FieldName.className='txtf';
	}
	else
	{
		FieldName.className='txtf';
	}
}
function PhonValue1(FieldName) {
	if(FieldName.value == '')
	{
		FieldName.value = 'Phone Number';
		FieldName.className='txtfa';
	}
	else
	{
		FieldName.className='txtf';
	}
}

function CellValue(FieldName) {
	if(FieldName.value == 'Mobile / Cell Phone Number' ||  FieldName.value == 'Mobile Number')
	{
	FieldName.value = '';
	FieldName.className='txtf';
	}
}
function CellValue1(FieldName) {
	if(FieldName.value == '')
	{
		FieldName.value = 'Mobile / Cell Phone Number';
		FieldName.className='txtfa';
	}
	else
	{
		FieldName.className='txtf';
	}
}
function CellValue2(FieldName) {
	if(FieldName.value == '')
	{
		FieldName.value = 'Mobile Number';
		FieldName.className='txtfa';
	}
	else
	{
		FieldName.className='txtf';
	}
}
function FaxValue(FieldName) {

	if(FieldName.value == 'Area Code')
{
FieldName.value = '';
FieldName.className='txtf';
}

else if(FieldName.value == '')
{
FieldName.value = 'Area Code';
FieldName.className='txtfa';
}

else
{
FieldName.className='txtf';
}
}


function ContValue(FieldName) {

	if(FieldName.value == 'Your Mobile / Cell Phone')
{
FieldName.value = '';
FieldName.className='txtf';
}

else if(FieldName.value == '')
{
FieldName.value = 'Your Mobile / Cell Phone';
FieldName.className='txtfa';
}

else
{
FieldName.className='txtf';
}
}


function desc1Value(FieldName) {

	if(FieldName.value == 'Your Mobile / Cell Phone')
{
FieldName.value = '';
FieldName.className='txtf';
}

else if(FieldName.value == '')
{
FieldName.value = 'Your Mobile / Cell Phone';
FieldName.className='txtfa';
}

else
{
FieldName.className='txtf';
}
}

function bg(c)
{
	document.getElementById(c).className='tlnk2'
}
function bg1(c)
{
	document.getElementById(c).className='tlnk1'
}
//for open vidio's
var win = null;

function NewWinIM(mypage,myname,compname)
{
var embedcode='';
var arr=mypage.split('/');
if (mypage.search(/heavy\#\#/) != -1){
      mypage = mypage.replace('heavy##','');
      var hw='height=350,width=370';
      var embedcode = '<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"></embed>';
}
else{
      var hw='height=350,width=370';
      var embedcode = '<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&amp;image=http://dc152.4shared.com/img/'+mypage+'&amp;autostart=true">';
}
LeftPosition = (screen.width) ? (screen.width-400)/2 : 0;
TopPosition = (screen.height) ? (screen.height-326)/2 : 0;

var settings = 'width=460';
settings += ', height=400';
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="#ffffff"><DIV style="color:#000000;font-size:11px;font-family:arial" align="center">Video by '+compname+'</DIV><DIV ALIGN="CENTER"><table BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="440"> <tr> <TD><img src="ts/top-left-1.gif"  WIDTH="7" HEIGHT="9"></TD> <TD BACKGROUND="ts/bottom-lcenter.gif"></TD> <TD><img src="ts/top-right-1.gif"  WIDTH="7" HEIGHT="9"></TD> </tr> <tr> <TD BACKGROUND="ts/l-bg1.gif"><img src="ts/zero.gif"  WIDTH="7" HEIGHT="1"></TD> <TD VALIGN="TOP"> <table CELLPADDING="0" CELLSPACING="0" BORDER="0"> <tr> <TD WIDTH="460" HEIGHT="350"> <DIV CLASS="sec-div" STYLE="background-image:url(ts/indicator-new.gif); background-repeat:no-repeat; background-position: center center;padding:10px;" > '+embedcode+'</DIV></TD> </tr> </table></TD> <TD BACKGROUND="ts/l-bg1.gif"><img src="ts/zero.gif"  WIDTH="7" HEIGHT="1"></TD> </tr> <tr> <TD><img src="ts/bottom-left-1.gif"  WIDTH="7" HEIGHT="9"></TD> <TD BACKGROUND="ts/bottom-lcenter.gif"></TD> <TD><img src="ts/bottom-right-1.gif"  WIDTH="7" HEIGHT="9"></TD> </tr> </table> </DIV></BODY></HTML>');
}
// show and hide product name on home page

var plnew = "pl2";
function show(obj, plus)
{
        if(document.getElementById)
	{
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv1").getElementsByTagName("div");
		for (var i=0; i<ar.length; i++)
		{
			if(ar[i].className == "on")
			{
				ar[i].className = "off";
			}
		}
		document.getElementById(obj).className = "on";
	}
	if(document.getElementById(plnew))
	{
		document.getElementById(plnew).className = "prhd";
	}
	if(document.getElementById(plus).className == "prhd")
	{
		document.getElementById(plus).className = "prhdm";
	}
	plnew = plus;
}
function show1(obj, plus)
{
	document.getElementById(obj).className = "on";
	document.getElementById(plus).className = "off";
}
function show2(obj, plus)
{
	document.getElementById(obj).className = "prdnm1";
	document.getElementById(plus).className = "off";
}

