<!--
// PREVIOUSLY SMFLash1.js  ---- start
var gsflash=new ccGs();
gsflash.init();

function ccGs()
{	this.util=new clsUtil();
	this.page=new clsPage();
	this.cookie=new clsCookie();
	this.init=startRun;
	// no closing bracket
	function startRun(){this.util.init();this.page.init();}

	function clsUtil()
	{	this.init=startRun;
		
		// no closing bracket
		function startRun(){
		String.prototype.trim=fxTrim;
		}
		
		function fxTrim(strInput)
		{	var strResult=null;if(strInput==null)strInput=this;if(strInput)
			{
			strResult=new String(strInput);strResult=strResult.replace(/^\s+/,"");
			strResult=strResult.replace(/\s+$/,"");
			}
			return(strResult);
		}
	} // closing bracket of clsUtil()

		function clsPage()
		{	this.init=startRun;
			
			function startRun(){
			}
			
		} //end closing bracket of ccGs()
		
			function clsCookie()
			{	this.set=ccSet; //rnm may6-ccSet
				this.get=ccGet; //rnm may6-ccGet
				this.remove=ccRemove;  //rnm may6-ccRemove
				this.buildMatrix=ccBuildMatrix; //rnm may6-ccBuildMatrix
	
				function ccSet(strKey,strValue,dtExpires,strPath,strDomain,blnSecure)
				{	var strCookie=strKey+"="+escape(strValue)+";";
						if(dtExpires){strCookie+="expires="+dtExpires.toUTCString()+";";}
							if((strPath)&&(strPath!="")){strCookie+="path="+strPath+";";}
								if((strDomain)&&(strDomain!="")){strCookie+="domain="+strDomain+";";}
									if(blnSecure){strCookie+="secure";}document.cookie=strCookie;
				}
	
				function ccGet(strKey)
				{	var strValue=null;
					var arrCookies=this.buildMatrix(new String(document.cookie));
					for(var intIndex=0;intIndex<arrCookies.length;intIndex++)
						{	if(arrCookies[intIndex][0]==strKey){strValue=arrCookies[intIndex][1];
							break;
						}
					}
					return strValue;
				}
		
				function ccBuildMatrix(strCookies)
				{	var arrCookie;
					var arrCookies=strCookies.split(";");
					for(var intIndex=0;intIndex<arrCookies.length;intIndex++)
					{	arrCookie=arrCookies[intIndex].trim().split("=");
						arrCookie[1]=unescape(arrCookie[1]);
						arrCookies[intIndex]=arrCookie;
					}
					return arrCookies;
				}
	
				function ccRemove(strKey,strPath,strDomain)
				{	var strCookie,dtYesterday;
					var strValue=this.get(strKey);
					if(strValue)
					{	strCookie=strKey+"=;";
						if((strPath)&&(strPath!=""))
						{	strCookie+="path="+strPath+";";
						}	if((strDomain)&&(strDomain!=""))
							{	strCookie+="domain="+strDomain+";";
							}	dtYesterday=new Date();
								dtYesterday.setDate(dtYesterday.getDate()-1);
								strCookie+="expires="+dtYesterday.toGMTString()+";";
								document.cookie=strCookie;
					}
					return strValue;
				} // end function ccRemove
		}
	}
// PREVIOUSLY SMFLash1.js  ---- end
	
// PREVIOUSLY SMFlash2.js ---- start
whatNavigator();

function whatNavigator()
{	navigator.unknown=1;
	navigator.ie=2;
	navigator.netscape=4;
	navigator.opera=8;
	navigator.type=null;
	navigator.version=null;
	navigator.os=null;
	navigator.jsVersion=1.0;
	navigator.vbScriptEnabled=false;
	navigator.hasPlugin=havPlugin;
	navigator.selectPluginDetectType=whatPluginDetectType;
	navigator.setCookie=setThisCookie; //may6 rnm setThisCookie
	navigator.hasFlash=havFlash;
	startRun();
	
function startRun()
{	var strBrowserCookie=gsflash.cookie.get("whatBrowser");
	if(strBrowserCookie)
	{eval(strBrowserCookie);navigator.selectPluginDetectType();
	}else{analyzeUsrAgnt();
	document.write("<scr"+"ipt language=\"JavaScript1.1\">navigator.jsVersion = 1.1;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript1.2\">navigator.jsVersion = 1.2;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript1.3\">navigator.jsVersion = 1.3;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript1.4\">navigator.jsVersion = 1.4;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript1.5\">navigator.jsVersion = 1.5;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript1.6\">navigator.jsVersion = 1.6;</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript2.0\">navigator.jsVersion = 2.0;</s"+"cript>");
	document.write("<scr"+"ipt language=\"VBScript\">navigator.vbScriptEnabled = true</s"+"cript>");
	document.write("<scr"+"ipt language=\"JavaScript\">navigator.selectPluginDetectType();navigator.setCookie();</s"+"cript>");
	}
}

function analyzeUsrAgnt()
	{	var version;switch(navigator.appName)
		{	case "Microsoft Internet Explorer":navigator.type=navigator.ie;
			navigator.version=getVersionIE();
			navigator.os=getOsIE();
			break;case "Netscape":navigator.type=navigator.netscape;
			navigator.version=getVersionNets();
			navigator.os=getOsNetscape();
			break;case "Opera":navigator.type=navigator.opera;
			navigator.version=getVersionOpera();
			navigator.os=getOsOpera();
			break;
			default:navigator.type=navigator.unknown;
			navigator.version=parseFloat(navigator.appVersion);navigator.os="Unknown";
			}
		}
		function getVersionIE()
		{	var strUserAgent=new String(navigator.userAgent);
			var arrUA=strUserAgent.split("MSIE ");
			return parseFloat(arrUA[1]);
		}
		function getVersionNets()
		{	var strUserAgent=new String(navigator.userAgent);
			var version,arrUA;
			if(strUserAgent.indexOf("Gecko")<0)
				{
				version=parseFloat(navigator.appVersion);
				}
					else if(strUserAgent.indexOf("Firefox")>-1)
					{
					arrUA=strUserAgent.split("Firefox");arrUA=arrUA[1].split("/");
					version=parseFloat(arrUA[1]);
					}
					else if(strUserAgent.indexOf("Safari")>-1)
					{
					arrUA=strUserAgent.split("Safari");
					arrUA=arrUA[1].split("/");
					version=parseFloat(arrUA[1]);
					}
					else
					{
					arrUA=strUserAgent.split("Netscape");
					arrUA=arrUA[1].split("/");
					version=parseFloat(arrUA[1]);
					}
			return version;
		}
		function getVersionOpera()
		{	var strUserAgent=new String(navigator.userAgent);
			var arrUA=strUserAgent.split("Opera/");
			return parseFloat(arrUA[1]);
		}
		function getOsIE()
		{	var strUserAgent=new String(navigator.userAgent);
			var arrUA=strUserAgent.split(";");
			return arrUA[2].substr(0,arrUA[2].length);
		}
		function getOsNetscape()
		{	var strOS;
			var strUserAgent=new String(navigator.userAgent);
			var arrUA=strUserAgent.split("(");arrUA=arrUA[1].split(";");
			if(this.version<6){strOS=arrUA[0];
			}
			else
			{
				strOS=arrUA[2];
			}
			return strOS;
		}
		function getOsOpera()
		{	var strUserAgent=new String(navigator.userAgent);
			var arrUA=strUserAgent.split("(");
			arrUA=(new String(arrUA[1])).split(";");
			return arrUA[0];
		}
		function havPlugin(strPluginName,strPluginObject)
		{	var blnHasPlugin=false;
			switch(navigator.pluginDetectType)
			{	case "plugins array":for(var i=0;i<navigator.plugins.length;i++)
				{	if(navigator.plugins[i].name.indexOf(strPluginName)>=0)
					{
					blnHasPlugin=true;
					break;
					}
				}
				break;
				case "detectPlugin function":blnHasPlugin=fxDetectPlugin(strPluginObject);
				break;
			}
			return blnHasPlugin;
		}
		function whatPluginDetectType()
		{	
		if((navigator.plugins)&&(navigator.plugins.length>0))
			{	
			navigator.pluginDetectType="plugins array";
			}
			else if(navigator.type=navigator.ie)
				{	
				if(navigator.jsVersion>=1.3)
					{	
						navigator.pluginDetectType="detectPlugin function";
			
						document.write("<scr"+"ipt language=\"JavaScript1.3\">\n");
						document.write("	function fxDetectPlugin(strPluginName){\n");
						document.write("		var blnHasPlugin = false;\n");
						document.write("		try{\n");
						document.write("			var obj = new ActiveXObject(strPluginName);\n");
						document.write("			blnHasPlugin = true;\n");
						document.write("		}   // try\n");
						document.write("		catch(Exception){");
						document.write("		}\n");
						document.write("		return blnHasPlugin;\n");
						document.write("	}   // fxCheckPlugin\n");
						document.write("</s"+"cript>\n");
					}
					else if(navigator.vbScriptEnabled){navigator.pluginDetectType="detectPlugin function";
						document.write("<scr"+"ipt language=\"VBScript\">\n");
						document.write("	function fxDetectPlugin(strPluginName)\n");
						document.write("		on error resume next\n");
						document.write("		if (IsObject(CreateObject(strPluginName))) then\n");
						document.write("			fxDetectPlugin = true\n");
						document.write("		else\n");
						document.write("			fxDetectPlugin = false\n");
						document.write("		end If\n");
						document.write("	end function\n");
						document.write("</s"+"cript>\n");
				}
				else{navigator.pluginDetectType="none";
				}
			}
		}

	function setThisCookie()
	{	var strCookieValue="navigator.type="+navigator.type+";\n"+"navigator.version="+navigator.version+";\n"+"navigator.os=\""+navigator.os+"\";\n"+"navigator.jsVersion="+navigator.jsVersion+";\n"+"navigator.vbScriptEnabled="+navigator.vbScriptEnabled+";\n";
		gsflash.cookie.set("whatBrowser",strCookieValue,null,"/");
	}
	
	function havFlash(fltVersion)
	{	var blnHasFlash=false;
		var strVersion;
		if(fltVersion)
		{	switch(navigator.pluginDetectType)
			{	case "plugins array":for(var i=0;i<navigator.plugins.length;i++)
				{	if(navigator.plugins[i].name.indexOf("Shockwave Flash")>=0)
					{	strVersion=navigator.plugins[i].description.substr(16,navigator.plugins[i].description.length);
						if(parseFloat(strVersion)>=fltVersion)
						{	
							blnHasFlash=true;
							break;
						}
					}
				}	
				break;
				case "detectPlugin function":blnHasFlash=fxDetectPlugin("ShockwaveFlash.ShockwaveFlash."+parseInt(fltVersion));
				break;
			}
		}
		else{
		blnHasFlash=navigator.hasPlugin("Shockwave Flash","ShockwaveFlash.ShockwaveFlash");
		}
		return blnHasFlash;
	}
}
// PREVIOUSLY SMFlash2.js ---- end



// PREVIOUSLY footer_hp.js ---- end

function addToFavorite(){
    if(navigator.appName=="Netscape"){
		alert("Please press D (CTRL-D) to bookmark this page");
    }else if(parseInt(navigator.appVersion)>3){
	    var pagetitle = document.title.toString();
        if (pagetitle=="") {
           pagetitle = "Indiamart.com";
        }
        var urlstr = document.location.toString();
        var patternQnMark = /\?/;
        var patternSlash = /\//;
        var patternGM = /GeneralManager/;
        urlstr = urlstr.replace(/http:\/\//,"");
        if (patternSlash.test(urlstr)) {
            if ((urlstr.substring(urlstr.length-4,urlstr.length)==".jsp") ||
                (urlstr.substring(urlstr.length-4,urlstr.length)==".com") ||
                (urlstr.substring(urlstr.length-1,urlstr.length)=="/"))
            {
                window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
            } else {
                window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)
            }
        }  else if (patternQnMark.test(document.location) || patternGM.test(document.location)) {
            window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)
        } else {
            window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
        }
    }
}

function HomepageNS() {
alert("Please Drag the link onto your Home button to make this your Home Page.");
}

function opencsfvideoBySize(linkhere,hgt,wdt) {
 msg=open(linkhere,"DisplayWindow","HEIGHT="+ hgt +",WIDTH="+ wdt +",status=no,toolbar=no,directories=no,menubar=no,location=no,scrollbars=no,top=100,left=50,resizable=no");
}


function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}