var strSelfURL = extractDom(location.href.toString());

function extractDom(strFullURL){ //TAKE OUT THE DOMAIN NAME
	if (strFullURL.indexOf('.com')<0){ 
		return strFullURL;
	}else{
		return strFullURL.substring(strFullURL.indexOf('.com')+4,strFullURL.length);
	}
}
if (window==top){ //IF THE WINDOW IS FRAMELESS
	top.location.replace("/frameset/frames.asp?strURL="+strSelfURL);
}
//might wanna check for strName here
function popWin(strURL,strW,strH,strAttr,strName){ //URL IS REQUIRED
	
	if (strW==0||strW==undefined){ strW=(Math.round(.8*screen.width)).toString(); }
	if (strH==0||strH==undefined){ strH=(Math.round(.8*screen.height)).toString(); }
	if (strAttr==0||strAttr==undefined){ strAttr=getAttributes(strW,strH)+getSizePos(strW,strH);}
	if (strName==0||strName==undefined){ strName='winObj'; }

	if (winObj) { // CHECK WINDOW STATUS
		if (winObj.closed) {	
			var winObj=window.open(strURL,strName,strAttr);
		}else{			
			winObj.moveTo(getLeft(strH),getTop(strW));
			winObj.resizeTo(strW,strH);
			winObj.focus();
		}
	}else{			
		var winObj=window.open(strURL,strName,strAttr);
	}
}	  
function getLeft(intW){ //GENERATE NON-SPECIFIED POSTION
	return((Math.round((screen.width-intW)/2)).toString());
}  
function getTop(intH){ //GENERATE NON-SPECIFIED POSTION
	return((Math.round((screen.height-intH)/2)).toString());
}
function getAttributes(){ //GENERATE NON-SPECIFIED ATTRIBUTES
	return('toolbar=no,location=no,resizable=no,menubar=no,status=no,scrollbars=yes,');
} 
function getSizePos(strW,strH){ //GENERATE NON-SPECIFIED SIZE
	return ('width='+strW+',height='+strH+',left='+getLeft(parseInt(strW))+',top='+getTop(strH));
}
function forceNavInfo(strSection,objThisLink){
	parent.frames['left'].forceNav(strSection,objThisLink);
}
function addFavBM(title,url){
	switch (true) {
		case document.all: //IE
			window.external.AddFavorite(url, title); 
		break;
		
		case window.sidebar: //Firefox
			window.sidebar.addPanel(title, url, ""); 
		break;
		
		case window.opera && window.print: // Opera
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		break;
		
		default: 
			alert('Your Browser does not support this action');	
	}
}