function popupbrand(x)
{
	window.open(x,"BrandPopup","height=500, width=610, scrollbars=yes, resizable=yes");
}

function win(x)
{
	window.open(x);
	return false;
}
function wscroll400(x)
{
	window.open(x,newwindowname(),"height=400, width=400, scrollbars=yes, resizable=yes");
	return false;
}
function wscroll500(x)
{
	window.open(x,newwindowname(),"height=500, width=500, scrollbars=yes, resizable=yes");
	return false;
}

function wscroll600(x)
{
	window.open(x,newwindowname(),"height=600, width=600, scrollbars=yes, resizable=yes");
	return false;
}
function wscroll650(x)
{
	window.open(x,newwindowname(),"height=650, width=650, scrollbars=yes, resizable=yes");
	return false;
}

function wscroll700(x)
{
	window.open(x,newwindowname(),"height=600, width=700, scrollbars=yes, resizable=yes");
	return false;
}




function wscroll800(x)
{
	window.open(x,newwindowname(),"height=600, width=800, scrollbars=yes, resizable=yes");
	return false;
}

function win264_155(x)
{
	window.open(x,newwindowname(),"height=155, width=264, scrollbars=no, resizable=yes");
	return false;
}


function win250(x)
{
	window.open(x,newwindowname(),"height=250, width=250, scrollbars=no, resizable=yes");
	return false;
}


function win300(x)
{
	window.open(x,newwindowname(),"height=300, width=300, scrollbars=no, resizable=yes");
	return false;
}


function win350(x)
{
	window.open(x,newwindowname(),"height=350, width=350, scrollbars=no, resizable=yes");
	return false;
}

function win400(x)
{
	window.open(x,newwindowname(),"height=400, width=400, scrollbars=no, resizable=yes");
	return false;
}
function win500(x)
{
	window.open(x,newwindowname(),"height=500, width=500, scrollbars=no, resizable=yes");
	return false;
}

function win600(x)
{
	window.open(x,newwindowname(),"height=600, width=600, scrollbars=no, resizable=yes");
	return false;
}

function win700(x)
{
	window.open(x,newwindowname(),"height=600, width=700, scrollbars=no, resizable=yes");
	return false;
}

function win500_350(x)
{
	window.open(x,newwindowname(),"height=350, width=500, scrollbars=no, resizable=no");
	return false;
}
function win500_320(x)
{
	window.open(x,newwindowname(),"height=320, width=500, scrollbars=no, resizable=no");
	return false;
}

function win350_470(x)
{
	window.open(x,newwindowname(),"height=470, width=350, scrollbars=no, resizable=no");
	return false;
}

function win800(x)
{
	window.open(x,newwindowname(),"height=600, width=800, scrollbars=no, resizable=yes");
	return false;
}

function mimagepopup(x)
{
	window.open(x,newwindowname(),"height=350, width=350, scrollbars=no, resizable=yes");
	return false;
}

function newwindowname()
{
	var ran_number=Math.round(Math.random()*1000);
	return "NewPopup"+ran_number; 
}

function OpenGenWS(x,pWidth,pHeight,pTop,pLeft,pShowAlert)
{
	var vFeatures = "height=" + pHeight + ", width=" + pWidth + ",top=" + pTop + ",left=" + pLeft + ",scrollbars=no, resizable=yes";
	if(pShowAlert == true)
	{
		alert(vFeatures);
	}
	window.open(x,newwindowname(),vFeatures);
	return false;
}
function OpenCenterWS(x,w,h) 
{ 
	var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + ',resizable=1,scrollbars=no';
    window.open(x,newwindowname(),winprops);
	return false;	
} 

//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
