// 061026 01
var gImages=new Array;
var gIndex=0;
var DCS=new Object();
var WT=new Object();
var DCSext=new Object();
var gQP=new Array();
var gService = true;
var gTimeZone = -5;
var gTempWtId = "";
var gWtId = "";
var gFpc="TN_FPC";
var gWTFpc="WT_FPC";
var gClickOn = 0;
var gDcsId = "";
var gDomain="65.215.109.89";
if (gService){
var gConvert=true;
}
function dcsCookie(){
if (typeof(dcsOther)=="function"){
dcsOther();
}
else if (typeof(dcsPlugin)=="function"){
dcsPlugin();
}
else if (typeof(dcsFPC)=="function"){
dcsFPC(gTimeZone);
}
}
function dcsGetCookie(name){
var pos=document.cookie.indexOf(name+"=");
if (pos!=-1){
var start=pos+name.length+1;
var end=document.cookie.indexOf(";",start);
if (end==-1){
end=document.cookie.length;
}
return unescape(document.cookie.substring(start,end));
}
return null;
}
function dcsGetCrumb(name,crumb){
var aCookie=dcsGetCookie(name).split(":");
for (var i=0;i<aCookie.length;i++){
var aCrumb=aCookie[i].split("=");
if (crumb==aCrumb[0]){
return aCrumb[1];
}
}
return null;
}
function dcsGetIdCrumb(name,crumb){
var cookie=dcsGetCookie(name);
var id=cookie.substring(0,cookie.indexOf(":lv="));
var aCrumb=id.split("=");
for (var i=0;i<aCrumb.length;i++){
if (crumb==aCrumb[0]){
return aCrumb[1];
}
}
return null;
}
function dcsDeleteCookie(cookie_name){
var curdom = "";
if ((window.location.hostname.indexOf('www.') >= 0) || (window.location.hostname.indexOf('ww8.') >= 0) || (window.location.hostname.indexOf('dev.') >= 0)) {
var curdom = window.location.hostname.substring(4,window.location.hostname.length);		
}
else if (window.location.hostname.indexOf('news.') >= 0) {
var curdom = window.location.hostname.substring(5,window.location.hostname.length);	
}
else if (window.location.hostname.indexOf('chopper.') >= 0) {
var curdom = window.location.hostname.substring(8,window.location.hostname.length);	
} else {
var curdom = window.location.hostname.substring(0,window.location.hostname.length);
}
var cookie_date = new Date ( );
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; domain=." + curdom + "; expires=" + cookie_date.toGMTString();
}
function dcsFPC(offset){
if (typeof(offset)=="undefined"){
return;
}
var dCur=new Date();
dCur.setTime(dCur.getTime()+(dCur.getTimezoneOffset()*60000)+(offset*3600000));
var dExp=new Date(dCur.getTime()+315360000000);
var dSes=new Date(dCur.getTime());
if (document.cookie.indexOf(gWTFpc+"=")!=-1){
var id=dcsGetIdCrumb(gWTFpc,"id");
var lv=parseInt(dcsGetCrumb(gWTFpc,"lv"));
var ss=parseInt(dcsGetCrumb(gWTFpc,"ss"));
if ((id==null)||(id=="null")||isNaN(lv)||isNaN(ss)){
return;
}
WT.co_f=id;
var dLst=new Date(lv);
dSes.setTime(ss);
if ((dCur.getTime()>(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){
dSes.setTime(dCur.getTime());
WT.vt_f_s="1";
}
if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){
WT.vt_f_d="1";
}
WT.cc="a";
}
else if ((document.cookie.indexOf(gFpc+"=")!=-1) && (document.cookie.indexOf(gWTFpc+"=")==-1)){
var id=dcsGetIdCrumb(gFpc,"id");
var lv=parseInt(dcsGetCrumb(gFpc,"lv"));
var ss=parseInt(dcsGetCrumb(gFpc,"ss"));
if ((id==null)||(id=="null")||isNaN(lv)||isNaN(ss)){
return;
}
WT.co_f=id;
var dLst=new Date(lv);
dSes.setTime(ss);
if ((dCur.getTime()>(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){
dSes.setTime(dCur.getTime());
WT.vt_f_s="1";
}
if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){
WT.vt_f_d="1";
}
WT.cc="b";
dcsDeleteCookie(gFpc);
}
else{
var tmpname=name+"_TMP=";
document.cookie=tmpname+"1";
if (document.cookie.indexOf(tmpname)!=-1){
document.cookie=tmpname+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";
if ((typeof(gWtId)!="undefined")&&(gWtId!="")){
WT.co_f=gWtId;
}
else if ((typeof(gTempWtId)!="undefined")&&(gTempWtId!="")){
WT.co_f=gTempWtId;
WT.vt_f="1";
}
else{
WT.co_f="2";
var cur=dCur.getTime().toString();
for (var i=2;i<=(32-cur.length);i++){
WT.co_f+=Math.floor(Math.random()*16.0).toString(16);
}
WT.co_f+=cur;
WT.vt_f="1";
}
if (typeof(gWtAccountRollup)=="undefined"){
WT.vt_f_a="1";
}
WT.vt_f_s="1";
WT.vt_f_d="1";
WT.cc="c";
}
else{
WT.vt_f="2";
WT.vt_f_a="2";
WT.cc="d";
return;
}
}
WT.co_f=escape(WT.co_f);
WT.vt_sid=WT.co_f+"."+dSes.getTime();
var expiry="; expires="+dExp.toGMTString();
document.cookie=gWTFpc+"="+"id="+WT.co_f+":lv="+dCur.getTime().toString()+":ss="+dSes.getTime().toString()+expiry+"; path=/"+(((typeof(gFpcDom)!="undefined")&&(gFpcDom!=""))?("; domain="+gFpcDom):(""));
}
function dcsAdv(){
dcsFunc("dcsCookie");
}
function dcsAssignDcsId(dcshostname){
	if ((dcshostname == "www.thomasnet.com") || (dcshostname == "thomasnet.com") || (dcshostname == "promoteyourbusiness.thomasnet.com") || (dcshostname == "secure.thomasnet.com") || (dcshostname == "aerospace.thomasnet.com") || (dcshostname == "whitepapers.thomasnet.com")) {
		gDcsId = "dcs8u0ga210000478ev8s20t9_1m4z";
	}
	else if (dcshostname == "news.thomasnet.com"){
		gDcsId = "dcsy41ne310000478ev8s20t9_9m9m";
	}
	else if (dcshostname == "chopper.thomasnet.com"){
		gDcsId = "dcs0oi7wkkqule458zggv4r7n_2y6h";
	}
	else if ((dcshostname == "www.1stindustrialdirectory.com") || (dcshostname == "1stindustrialdirectory.com")){
		gDcsId = "dcsouznxlkqule0u8t9q738da_1s7l";
	}
	else if ((dcshostname == "www.thomasregistry.com") || (dcshostname == "thomasregistry.com")){
		gDcsId = "dcs8m6bwh10000gwbzdnrpiyc_9h6c";
	}
	else if (dcshostname == "ww8.thomasnet.com"){
		gDcsId = "dcsclcqkpz23dua62j0xfblsw_6t3q";
	}
	else if ((dcshostname == "dev.thomasnet.com") || (dcshostname == "ww8.thomasnet.com")){
		gDcsId = "dcspao3f310000478ev8s20t9_9m5w";
	}
	else if ((dcshostname == "www.tgrnet.com") || (dcshostname == "tgrnet.com") || (dcshostname == "www.thomasglobal.com") || (dcshostname == "www.thomasglobal.co.uk") || (dcshostname == "www.tgrnet.co.uk") || (dcshostname == "www.thomas-global.de") || (dcshostname == "www.tgrnet.de") || (dcshostname == "www.tgrnet.com.de") || (dcshostname == "www.thomasglobal.fr") || (dcshostname == "www.tgrnet.fr") || (dcshostname == "www.thomasglobal.com.es") || (dcshostname == "www.tgrnet.com.es") || (dcshostname == "www.thomasglobal.it") || (dcshostname == "www.tgrnet.it") || (dcshostname == "www.thomasglobal.nl") || (dcshostname == "www.tgrnet.nl") || (dcshostname == "www.thomasglobal.com.br") || (dcshostname == "www.tgrnet.com.br") || (dcshostname == "www.thomasglobal.com.mx") || (dcshostname == "www.tgrnet.com.mx") || (dcshostname == "www.thomasglobal.com.cn") || (dcshostname == "www.tgrnet.com.cn") || (dcshostname == "www.thomasglobal.co.jp") || (dcshostname == "www.tgrnet.jp") || (dcshostname == "www.ipf-net.com") || (dcshostname == "www.thomasglobal.co.in") || (dcshostname == "www.tgrnet.co.in") || (dcshostname == "www.thomasindia.com") || (dcshostname == "www.tgreurope.com") || (dcshostname == "www.tremnet.com") || (dcshostname == "thomasglobal.com") || (dcshostname == "thomasglobal.co.uk") || (dcshostname == "tgrnet.co.uk") || (dcshostname == "thomas-global.de") || (dcshostname == "tgrnet.de") || (dcshostname == "tgrnet.com.de") || (dcshostname == "thomasglobal.fr") || (dcshostname == "tgrnet.fr") || (dcshostname == "thomasglobal.com.es") || (dcshostname == "tgrnet.com.es") || (dcshostname == "thomasglobal.it") || (dcshostname == "tgrnet.it") || (dcshostname == "thomasglobal.nl") || (dcshostname == "tgrnet.nl") || (dcshostname == "thomasglobal.com.br") || (dcshostname == "tgrnet.com.br") || (dcshostname == "thomasglobal.com.mx") || (dcshostname == "tgrnet.com.mx") || (dcshostname == "thomasglobal.com.cn") || (dcshostname == "tgrnet.com.cn") || (dcshostname == "thomasglobal.co.jp") || (dcshostname == "tgrnet.jp") || (dcshostname == "ipf-net.com") || (dcshostname == "thomasglobal.co.in") || (dcshostname == "tgrnet.co.in") || (dcshostname == "thomasindia.com") || (dcshostname == "tgreurope.com") || (dcshostname == "tremnet.com") || (dcshostname == "thomasglobal.cn") || (dcshostname == "www.thomasglobal.cn")){
		gDcsId = "dcs0sdy8iw4o2c0jrmc8o0uow_1b3w";
	}
	else if ((dcshostname == "partspec.thomasnet.com") || (dcshostname == "plantspec.thomasnet.com") || (dcshostname == "cadblocks.thomasnet.com") || (dcshostname == "cad.thomasnet.com") || (dcshostname == "psV5.cadregister.com") || (dcshostname == "ps.cadregister.com") || (dcshostname == "pl.cadregister.com") || (dcshostname == "cb.cadregister.com") || (dcshostname == "partspec.cadregister.com") || (dcshostname == "plantspec.cadregister.com")){
		gDcsId = "dcsc1tdydwmhii1qgpbxcehib_2x4h";
	}
	else if (dcshostname == "forums.thomasnet.com"){
		gDcsId = "dcs0oaxm0wmhii1yy03vcdnxw_1m3f";
	}
	else {
		gDcsId = "dcsvjwe8la0544emtudg7klyg_7u3l";
	}
}
dcsAssignDcsId(window.location.hostname);
if ((typeof(gConvert)!="undefined")&&gConvert&&(document.cookie.indexOf(gWTFpc+"=")==-1)){
document.write("<SCR"+"IPT Language='JavaScript' SRC='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+"/"+gDcsId+"/wtid.js"+"'></SCR"+"IPT>");
}