

   
		
		
//function list

//openWin allows ou to open a window any size, any positon on screen with a selection of chrome
//openCentre allows you to open a window centred on the users primary monitor with a selection os chrome
//openFull allows you to open a window as big as possible includein 'fullscreen' in IE > but thsi is an opetion that must be chosen
//openFullscroll this allows you to open a window as big as possible with a selection of chrome

//closeit() should be inserted (at the end of pieces) in pieces which have a story type ending
//e.g. a movie as it will close your winodow as well as restart the interface underneath
// an insertion in a shockwave movie would look like 
//on exitFrame me
//  gotoNetPage "javascript:closeit()"
//end
//Flash woudl be similar but with getURL command (targeted at _self)

//if you are using this closeit() function you must include in the html header of your page the following code
//    <script language="JavaScript" src="http://offline.area3.net/wartime/wtscript.js"></script>






function openWin(a,b,c,d,e,x,y,f) {
// a=href > in single quotes, b=width of window you want > a number, c=height of window > a number,
// d=name of window > in single quotes, e=status bar > 1 or 0, x = x positon > numeral,
//y = y positon > numeral, f=scroll bars > 1 or 0

if (navigator.appVersion.substring (0,1) > 3)
        {    var x1 = screen.availWidth - 10;
		    var y1 = screen.availHeight-30;}
        else{var x1 = 800;
        var y1 = 600;}

if(f!=1){f=0;}

win=open(a,d,'toolbar=no,status=no,Width='+b+',Height='+c+',directories=no,scrollbars='+f+',status='+e+',location=no,resize=no,menubar=n,screenx='+x+',screeny='+y+',left='+x+',top='+y)}
 
function openCentre(a,b,c,d,e,f,g) {
//where a=href > in single quotes, b=width of window you want > a number, c=height of window > a number, d=name of window > in single quotes, e=adjust centring horizontally > a number, f=status bar > 1 or 0



if (navigator.appVersion.substring (0,1) > 3)
        {    var x1 = screen.availWidth - 10;
		    var y1 = screen.availHeight-30;}
        else{var x1 = 800;
        var y1 = 600;}

        if(x> 1600){var x = (x1/(4));}
        else{var x = (x1/2);} 
        
        var y = (y1/2);
		adb= (b/2)+e;
		adc= c/2;
        

win=open(a,d,'toolbar=no,status=no,Width='+b+',Height='+c+',directories=no,scrollbars='+g+',status='+f+',location=no,resize=no,menubar=no,screenx='+(x-adb)+',screeny='+(y-adc)+',left='+(x-adb)+',top='+(y-adc));
}


function openFull(a,b,c){
//where a=href > in single quotes, b=name of window > in single quotes,
//c=fullscreen for IE > 0 is yes, 1 is NO

if (navigator.appVersion.substring (0,1) > 3)
        {    var x1 = screen.availWidth - 10;
		    var y1 = screen.availHeight-30;}
        else{var x1 = 800;
        var y1 = 600;}

if(navigator.appName=="Netscape" || c == 1 || navigator.appVersion.indexOf("Mac") != -1){
win=open(a,b,'toolbar=no,status=no,Width='+x1+',Height='+y1+',directories=no,scrollbars=no,status=0,location=no,resize=no,menubar=n,screenx=0,screeny=0,left=0,top=0);')}

else{win=open(a,b,"fullscreen")}

};

function openFullscroll(a,b,c,d,e,f){
//where a=href > in single quotes, b=name of window > in single quotes,
//c=status > 1 or 0, d=scrollbars > 1 or 0, e=toolbar > 1 or 0, f=location bar > 1 or 0


if (navigator.appVersion.substring (0,1) > 3)
        {    var x1 = screen.availWidth - 10;
		if(f==1 || e==1){
		   var y1 = screen.availHeight-40};
			else{var y1 = screen.availHeight-30;}
			}
        else{var x1 = 800;
        var y1 = 600;}
		

if(c==1){y1=y1-18;}

if(e==1){y1=y1-18;}

if(f==1){y1=y1-18;}

win=open(a,b,'toolbar=no,status=no,Width='+x1+',Height='+y1+',directories=no,scrollbars='+d+',status='+c+',location='+f+',resize=yes,menubar=0,screenx=0,screeny=0,left=0,top=0,toolbar='+e+');')



};

function open_strip(a,d) {
//where a=href > in single quotes,  d=name of window > in single quotes


x = (screen.availWidth - 10)/2;
	y = screen.availHeight-120;
	
		
		//alert("w=" + screen.availHeight)
		
		//var x = screen.width

      
       // var y = (y1/2);
		adb= (700/2);
		
        

win=open(a,d,'toolbar=no,status=no,Width=700,Height='+y+',directories=no,scrollbars=yes,status=yes,location=yes,resize=yes,menubar=yes,screenx='+(x-adb)+',screeny=0,left='+(x-adb)+',top=0');



//d.focus();

}


function open_strip2(a,d) {
//where a=href > in single quotes,  d=name of window > in single quotes


x = (screen.availWidth - 10)/2;
	y = screen.availHeight-120;
	
		
		//alert("w=" + screen.availHeight)
		
		//var x = screen.width

      
       // var y = (y1/2);
		adb= (770/2);
		
        

win=open(a,d,'toolbar=no,status=no,Width=770,Height='+y+',directories=no,scrollbars=yes,status=yes,location=yes,resize=yes,menubar=yes,screenx='+(x-adb)+',screeny=0,left='+(x-adb)+',top=0');



//d.focus();

}


function openCentre2(a,b,c,d,e,f,g) {


if (navigator.appVersion.substring (0,1) > 3)
        {    var x1 = screen.availWidth - 10;
		    var y1 = screen.availHeight-30;}
        else{var x1 = 800;
        var y1 = 600;}

        if(x> 1600){var x = (x1/(4));}
        else{var x = (x1/2);} 
          
		if (document.images[0].height > screen.availHeight-50)
		{h=screen.availHeight-40;
		w=document.images[0].width+16; 
		sc=1;}
		else{h=document.images[0].height;
		w=document.images[0].width;
		sc=0;}
		
		
        var y = (y1/2);
		adb= (w/2)+e;
		adc= h/2;
      

win=open(a + "&height=" +(h)+"&width="+document.images[0].width,d,'toolbar=no,status=no,Width='+w+',Height='+h+',directories=0,scrollbars=0,status=0,location=0,resize=0,menubar=0,screenx='+(x-adb)+',screeny='+(y-adc)+',left='+(x-adb)+',top='+(y-adc));

close();

}

