var ddequalcolumns=new Object()
//Input IDs (id attr) of columns to equalize. Script will check if each corresponding column actually exists:
ddequalcolumns.columnswatch=["contentcolumn", "leftcolumn","dd"]

ddequalcolumns.setHeights=function(reset){

var tallest=0
var resetit=(typeof reset=="string")? true : false
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null){
if (resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if (document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight
}
}
if (tallest>0){
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"
}
}
}

ddequalcolumns.resetHeights=function(){
this.setHeights("reset")
}

ddequalcolumns.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}

ddequalcolumns.dotask(window, function(){ddequalcolumns.setHeights()}, "load")
ddequalcolumns.dotask(window, function(){if (typeof ddequalcolumns.timer!="undefined") clearTimeout(ddequalcolumns.timer); ddequalcolumns.timer=setTimeout("ddequalcolumns.resetHeights()", 200)}, "resize")


// Java Script for General Usage
var data;
function openpopup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=600,left = 237,top = 84');");
}
function openpopupnew(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=400,left = 237,top = 50%');");
}
function openpopuprequest(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=440,height=290,left = 50%,top = 50%');");
}
function openpopupcontactus(popurl){
winpops=window.open(popurl,"","width=600,height=500,scrollbars=yes,left=225',top=50")
}
function closewindow()
  {
    this.close()
  }
 function req(popurl){
winpops=window.open(popurl,"","width=410,height=240,left=225',top=50")
}
function closewindow()
  {
    this.close()
  }
function add_to_faw()
{
bookmarkurl="http://www.perfumedistributor.com"
bookmarktitle="Perfume Distributor"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
function addBookmark(title,url) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
/*DIV POPUP*/
function showme(name){
var boxwidth = document.getElementById("brand-description").style.width;
var boxheight = document.getElementById("brand-description").style.height;
 var sw = (screen.width - boxwidth.substring(0,3)) / 3;
 var sh = (screen.height - boxheight.substring(0,3))/3;
 document.getElementById("brand-description").style.display="block";
 document.getElementById("brand-description").style.left=sw;
 document.getElementById("brand-description").style.top=sh;
 document.getElementById("myname").innerHTML=name; 
}
function hide(){
 document.getElementById("brand-description").style.display="none";
}
/*Display Data in DIV*/
function outofstock(){
document.getElementById("ostock").style.display="block";
}
/*Datasubmiter*/
function submitForm() {
window.open ("http://ys.satisnet.org/perfumedistributor/new/php/notify.php", "NewWindow","menubar=0,resizable=0,width=350,height=150");
document.myform.submit();
}

window.onload=function doLoad() { 
browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;
	if(browser_type == "Microsoft Internet Explorer"){
		document.getElementById("lbox").style.width="240px";
	}
}
/*Clear Error*/
function ClearError() {
window.status = "Done";
return true;
}
window.onerror = ClearError;
//Pop Window
function popUp(page,PWidth,PHeight,id){
eval("designerwiz"+id+"=window.open('"+page+"','designerwiz1','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+PWidth+",height="+PHeight+"')")
eval("designerwiz"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")
}