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.nadeemleatherproducts.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=1380976&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>');
}

	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+'');
	}

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('.sub1{display: none;}\n')
document.write('.tbq{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("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";
		}
	}
}


//-----------------------------------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("ts/skype1.png");
		index_2 = newImage("ts/msn1.png");
		index_3 = newImage("ts/yahoo1.png");
		index_4 = newImage("ts/google1.png");
       	preloadFlag = true;
	}
}


//---------------------------dynamiclayout effect---------------------------------


// Title : Dynamic Resolution Dependent Layout Demo


// getBrowserWidth is taken from The Man in Blue Resolution Dependent Layout Script

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

//Rightmenu
//eyesys dhtml  (c)eyecon 2002 [ eyecon@webteam.ro ]
//visit www.webteam.ro for great scripts and tutorials

var ie5=window.createPopup

if (ie5)
document.oncontextmenu=init;
var eyesys="";
var preitem="";
function init(){
objname = event.srcElement.tagName;

if(!((objname=='IMG') || (objname=='P') || (objname=='B') || (objname=='DIV') || (objname=='A')))
{
mx=event.clientX;
my=event.clientY;
menx=window.screenLeft+mx;
meny=window.screenTop+my;
sysmen=window.createPopup();
sysmen.document.write(eyesys);
sysmen.show(menx,meny,eyesys_width,document.getElementById('men').offsetHeight);
return false
}else{
	return true
}

};

function eyesys_init(){
if (ie5){
eyesys+=("<style type='text/css'>.textul{position:absolute;top:0px;color:"+eyesys_titletext+";writing-mode:	tb-rl;padding-top:10px; filter: flipH() flipV() dropShadow( Color=000000,offX=-2,offY=-2,positive=true);z-Index:10;width:100%;height:100%;font: bold 11px verdana}.gradientul{position:relative;top:0px;left:0px;width:100%;background-color:"+eyesys_titlecol2+";height:100%;z-Index:9;FILTER: alpha( style=1,opacity=0,finishOpacity=100,startX=100,finishX=100,startY=0,finishY=100)}.contra{background-color:"+eyesys_titlecol1+";border:1px inset "+eyesys_bg+";height:98%;width:18px;z-Index:8;top:0px;left:0px;margin:2px;position:absolute;}.men{position:absolute;top:0px;left:0px;padding-left:18px;background-color:"+eyesys_bg+";border:2px outset "+eyesys_bg+";z-Index:1;}.men a{margin:1px;cursor:default;padding-bottom:4px;padding-left:1px;padding-right:1px;padding-top:3px;text-decoration:none;height:100%;width:100%;color:"+eyesys_cl+";font:normal 12px sans-serif;}.men a:hover{background:"+eyesys_bgov+";color:"+eyesys_clov+";} BODY{overflow:hidden;border:0px;padding:0px;margin:0px;}.ico{border:none;float:left;}</style><div class='men'>")
}
};

function eyesys_item(txt,ico,lnk){
if (ie5){
if(!ico)ico='s.gif';
preitem+=("<a href='#'  onmousedown='parent.window.location.href=\""+lnk+"\"'><img src='"+ico+"'  width='16' height='16' class='ico'> "+txt+"</a>")
}
};

function eyesys_close(){
if (ie5){
eyesys+=preitem;
eyesys+=("</div><div class='contra'><div class='gradientul'></div><div class='textul' id='titlu'>"+eyesys_title+"</div></div>");
document.write("<div id='men' style='width:"+eyesys_width+"'></div>");
document.getElementById('men').innerHTML=preitem
}
}

document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>')


eyesys_item('Home','ts/home.gif','index.html')
eyesys_item('About Us','ts/profile.gif','about-us.html')
eyesys_item('Our Products','ts/products.gif','leather-products.html')
//eyesys_item('Trade Offer','ts/tradeoffer.gif','tradeoffer.html')
if(0){
eyesys_item('','ts/career.gif','')}
if(0){
eyesys_item('','ts/news.gif','')}
if(0){
eyesys_item('','ts/news.gif','')}
eyesys_item('Contact','ts/home.gif','query.html?qtype=contact')
eyesys_item('Enquiry','ts/email1.gif','query.html')
//end of rightmenu

//rightitem

//MENU TITLE
eyesys_title="Welcome "
//TITLE BACKGROUND COLORS
eyesys_titlecol1="#002430"
eyesys_titlecol2="#002430"
//TITLE COLOR
eyesys_titletext="white"
//MENU & ITEM BACKGROUND COLOR
eyesys_bg="#0A3949"
//ITEM BACKGROUND COLOR ON MOUSE OVER
eyesys_bgov="#2E6A7F"
//MENU COLOR
eyesys_cl="white"
//MENU COLOR ON MOUSE OVER
eyesys_clov="white"
//MENU WIDTH
eyesys_width=180
//menu starts here
eyesys_init()

eyesys_close()
//end of rightitem

//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><LINK HREF="ts/dir_video.css" REL="stylesheet" TYPE="text/css" TITLE="default"></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="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="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>');
}
