function writeFlash()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="300" title="OWN magazine">');
document.write('<param name="bgcolor" value="black">');
document.write('<param name="movie" value="/flash/website_splash.swf">');
document.write('<param name="quality" value="high">');
document.write('<embed src="/flash/website_splash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="300"></embed>');
document.write('</object>');
}

function writeMenuFlash()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="312" height="42">');
    document.write('<param name="movie" value="/flash/navigation.swf">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="/flash/navigation.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="312" height="42"></embed>');
    document.write('</object>');
}

function writeHeaderFlash()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="681" height="214">');
    document.write('<param name="movie" value="/flash/countdown.swf">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="/flash/countdown.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="681" height="214"></embed>');
    document.write('</object>');
}

function writeFeatureFlash(num)
{
    document.write('<embed src="/flash/feature' + num + '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="800"></embed>');
}

function writeTopFlash(num)
{
document.write('<embed src="/flash/top3.swf" menu="false" quality="high" scale="noscale" width="100%" height="100%" name="default" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ')
}
function writeMainFlash(num)
{
	w = document.body.clientWidth;
	h = screen.height;
	document.write('<embed src="/main/main' + num + '.swf" menu="false" quality="high" scale="noscale" width="' + w + '" height="' + h + '" name="default" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ')
}

function writeStoreFlash(name)
{
document.write('<embed src="/store/swf/' + name + '.swf" menu="false" quality="high" scale="noscale" width="250px" height="200px" name="default" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ')
}

function flipimage(name){
    document.images['mail'].src = "/images/" + name + ".gif";
}

function preloadImages(){
    model = document.cart_quantity.products_model.value;
    category = document.cart_quantity.categories_id.value;
    document.L1 = new Image();
    document.L2 = new Image();
    document.L3 = new Image();
    document.L4 = new Image();
    document.SZ = new Image();
    document.L1.id = 'L1';
    document.L2.id = 'L2';
    document.L3.id = 'L3';
    document.L4.id = 'L4';
    document.SZ.id = 'SZ';
    document.L1.src = '/store/images/' + model + '_L1.jpg';
    document.L2.src = '/store/images/' + model + '_L2.jpg';
    document.L3.src = '/store/images/' + model + '_L3.jpg';
    document.L4.src = '/store/images/' + model + '_L4.jpg';
    document.SZ.src = '/store/images/' + model + '_SZ.gif';
}

function loadImage(imgid){
    document.images['large'].src = eval("document." + imgid + ".src");
}

function swapPage(page){
    document.getElementById('page1').style.display = 'none';
    document.getElementById('page2').style.display = 'none';
    document.getElementById('page3').style.display = 'none';
    document.getElementById('page4').style.display = 'none';
    document.getElementById(page).style.display = 'block';
}

function featureOpen(page){
    maxWin2 = window.open(page, "", "width=900,height=820,directories=no,toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=no");
    maxWin2.moveTo(0,0);
    if (screen.height / screen.width < 0.75)
      maxWin2.resizeTo(screen.availHeight*1.6,screen.availHeight);
    else
      maxWin2.resizeTo(screen.availWidth,screen.availHeight);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function loadSwapImages(){
  MM_preloadImages('/images/navigations/navHOMEover.gif', '/images/navigations/navSTOREover.gif', '/images/navigations/navLISTover.gif', '/images/navigations/navBLOGover.gif', '/images/navigations/navFEATUREover.gif', '/images/navigations/navNEWSover.gif'); 
}

function moveWinCenter(){
//window.resizeTo(800,600);
//function eve1(){window.resizeTo(800,600)}
  var WW = document.body.offsetWidth/2;
  var WH = document.body.offsetHeight/2;
  var SUW = (screen.width/2)-WW;
  var SSH = (screen.height/2)-WH;
  window.moveTo(SUW,SSH);
//return true;
}

function r_over(id, op)
{
n = op;
obj = document.getElementById(id);
obj.style.opacity = n / 100;
obj.style.mozOpacity = n / 100;
obj.style.filter = "alpha(opacity="+n+")";
n += 5;
//if (n < 100) setTimeout("fadein(" + id + ")",50);
}
function r_out(id)
{
obj = document.getElementById(id);
obj.style.opacity = 1;
obj.style.mozOpacity = 1;
obj.style.filter = "";
n -= 5;
//if (n >= 0) setTimeout("fadeout(" + id +")",50);
}

function openFullwindow() {
	var PAGE="http://own-magazine.com/test.html";
	var windowNamen="owntop";
	var browserName=navigator.appName;
	var operatingSystem=navigator.platform;
	var version = parseFloat(navigator.appVersion);

	// Netscape check version 4.0+ on Win
	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(PAGE,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
	 }

	// MSIE Mac check
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(PAGE,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
	 }

	// Netscape Mac check
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(PAGE,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
	 }

	// MSIE Windows
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 //window.open(PAGE,windowNamen,'fullscreen=yes')
	var win = window.open(PAGE,windowNamen,'fullscreen=yes, titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scroll=0,scrollbars=0,resizable=0,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availHeight+',screenX=0,screenY=0,top=0,left=0, statusbar=0')
		win.resizeTo(screen.width, screen.height);
		 //win.moveTo(1, 1);
		 //win.moveTo(0, 0);
		 //win.resizeTo(screen.width, screen.height);
	 }

	// Netscape Windows
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 window.open(PAGE,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
	 }

	else
	 {
	 window.open(PAGE,windowNamen);
	 }

}

function writeSSFlash(num)
{
document.write('<embed src="/flash/ss.swf" menu="false" quality="high" scale="noscale" width="100%" height="100%" name="default" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ')
}
function writeSFFlash(num)
{
document.write('<embed src="/pickup/feature' + num + '.swf" menu="false" quality="high" scale="noscale" width="100%" height="100%" name="default" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> ')
}
