//******** this js is getting messy....******** //

var platform;
var browser;
var windowSize;

if(navigator.userAgent.indexOf('Win') == -1) {
	platform = 'MAC'; 
} else { 
	platform = 'WIN'; 
} 

if(navigator.appName.indexOf('Netscape') == -1) {
	browser = 'IE'; 
} else { 
	browser = 'NN';
}
function popUp(URL) {
		var newWindow = window.open(URL,'window','width=800,height=450,top=300,left=350,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function popUp2(URL) {
		var newWindow2 = window.open(URL,'window2','width=1030,height=240,top=0,left=100,scrollbars=no,menubar=no,toolbar=no,location=no');
}

//******** main ******** //
function main(){
		var winl = (screen.width - 780) / 2;
			var wint = (screen.height - 600) / 2;
  var newWindow = window.open('http://kanae.com/main.htm','main','height=504,width=780,top='+wint+',left='+winl+',scrollbars=no');
}

function portfolio(){
	var newWindow = window.open('http://kanae.com/portfolio.htm','portfolio','width=750,height=screen.width,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function ex(URL){
	var w = screen.width - 12;
	var h = screen.height - 31;
	var fileName =URL;
	
	if(platform == 'WIN' && browser == 'IE'){
		w = screen.width;
		h = screen.height - 25;
		myWin=window.open(fileName,"portfolio","scrollbars=0,resizable=yes,location=no,menubar=no,status=no,left=0,top=0");
		myWin.resizeTo(w,h);
   	}else if( platform == 'WIN' && browser == 'NN'){
		windowSize = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		myWin=window.open(fileName,"portfolio","scrollbars=0,resizable=yes,location=no,menubar=no,status=no," + windowSize);
		myWin.moveTo(0,0);
	}else if(platform == 'MAC' && browser == 'IE'){
		h = screen.height - 35;	
		myWin=window.open(fileName,"portfolio","scrollbars=0,resizable=yes,location=no,menubar=no,status=no,left=0,top=0");
		myWin.resizeTo(w,h);
	}else if(platform == 'MAC' && browser == 'NN'){
		h = screen.height - 49;
		windowSize = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		myWin=window.open(fileName,"portfolio","scrollbars=0,resizable=yes,location=no,menubar=no,status=no," + windowSize);
		myWin.moveTo(0,0)
	}		
}



function full(URL,Name){
	var w = screen.width - 12;
	var h = screen.height - 31;
	var fileName =URL;
	var windowName =Name;
	
	if(platform == 'WIN' && browser == 'IE'){
		w = screen.width;
		h = screen.height - 25;
		myWin=window.open(fileName,windowName,"scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
		//myWin.resizeTo(w,h);
   	}else if( platform == 'WIN' && browser == 'NN'){
		windowSize = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		myWin=window.open(fileName,windowName,"scrollbars=0,resizable=no,location=no,menubar=no,status=no," + windowSize);
		myWin.moveTo(0,0);
	}else if(platform == 'MAC' && browser == 'IE'){
		h = screen.height - 35;	
		myWin=window.open(fileName,windowName,"scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
		myWin.resizeTo(w,h);
	}else if(platform == 'MAC' && browser == 'NN'){
		h = screen.height - 49;
		windowSize = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		myWin=window.open(fileName,windowName,"scrollbars=0,resizable=no,location=no,menubar=no,status=no," + windowSize);
		myWin.moveTo(0,0)
	}		
}

function kimono(){
		var winl = (screen.width - 670) / 2;
		var wint = (screen.height - 670) / 2;
  var newWindow = window.open('electrotextile/kimono/index.html','kimono','height=670,width=670,top='+wint+',left='+winl+',scrollbars=yes');
}

function pattern(){
		var winl = (screen.width - 670) / 2;
		var wint = (screen.height - 670) / 2;
  var newWindow = window.open('pattern/index.html','pattern','height=670,width=670,top='+wint+',left='+winl+',scrollbars=yes');
}

function daybook(){
		var winl = (screen.width - 780) / 2;
		var wint = (screen.height - 650) / 2;
  var newWindow = window.open('electrotextile/','dayboook','height=650,width=780,top='+wint+',left='+winl+',scrollbars=yes');
}

function citiwalk(){
		var winl = (screen.width - 800) / 2;
			var wint = (screen.height - 600) / 2;
  var newWindow = window.open('http://kanae.com/citiwalk/index.htm','citiwalk','height=504,width=800,top='+wint+',left='+winl+',scrollbars=no');
}

function hybrid(){
		var winl = (screen.width - 820) / 2;
			var wint = (screen.height - 620) / 2;
  var newWindow = window.open('electrotextile/4_03_display/index.html','hybrid','height=620 width=820,top='+wint+',left='+winl+',scrollbars=no');
}

function vj(){
		var winl = (screen.width - 500) / 2;
		var wint = (screen.height - 850) / 2;
  var newWindow = window.open('http://kanae.com/gallery/flash_1.html','VJ','height=850 width=500 top='+wint+',left='+winl+',resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function escoop(){
	var newWindow = window.open('escoop/index.htm','escoop','width=680,height=680,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function kimonoposter(){
	var newWindow = window.open('electrotextile/kimono/poster.htm','kimono','width=670,height=800,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function table(){
	var newWindow = window.open('electrotextile/2_04/colorful_tile.html','table','width=670,height=720,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}
function tableposter(){
	var newWindow = window.open('electrotextile/2_04/poster.htm','table','width=670,height=800,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function silkposter(){
	var newWindow = window.open('silk/index.htm','silk','width=650,height=800,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function silkphoto(){
	var newWindow = window.open('silk/silk.htm','silk','width=650,height=760,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function kaleidocube(){
	var newWindow = window.open('http://kanae.com/kaleidocube/index.htm','kaleidocube','width=700,height=800,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function cube3d(){
	var newWindow = window.open('kaleidocube/cube3d.htm','cube','width=470,height=430,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function colorpix(){
	var newWindow = window.open('http://www.eyelogy.com/ColorRoom/','colorpix','width=1024,height=768,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function cia(){
	var newWindow = window.open('citiwalk/convini1.htm','cia','width=600,height=400,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}


function pOmcontext(){
	var newWindow = window.open('http://www.kanae.com/pictomail/context/context.html','pOmcontext','width=800,height=600,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function pOmflow(){
	var newWindow = window.open('http://www.kanae.com/pictomail/flow/pictomail-flowchart.html','pOmflow','width=645,height=825,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function pOmflash(){
	var newWindow = window.open('http://www.kanae.com/pictomail/flash_demo/index.htm','pictoflash','width=800,height=640,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}


function pOm01(){
	var newWindow = window.open('gui01.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm02(){
	var newWindow = window.open('gui02.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm03(){
	var newWindow = window.open('gui03.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm04(){
	var newWindow = window.open('gui04.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm05(){
	var newWindow = window.open('gui05.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm06(){
	var newWindow = window.open('gui06.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm07(){
	var newWindow = window.open('gui07.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm08(){
	var newWindow = window.open('gui08.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm09(){
	var newWindow = window.open('gui09.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function pOm10(){
	var newWindow = window.open('gui10.htm','pOm','width=430,height=370,top=0,left=625,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}


function r4p(){
	var newWindow = window.open('r4p/index.html','window','width=815,height=605,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function pcom(){
	var newWindow = window.open('p-com/index.htm','window','width=810,height=610,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function exit(){
	var newWindow = window.open('exit/interactive_work.htm','window','width=780,height=screen.width,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function sound(){
	var newWindow = window.open('sound/main.html','window','width=640,height=580,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function quilt(){
	var newWindow = window.open('electrotextile/2_03/quilt/kaleidoquilt.htm','quilt','width=640,height=700,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function flowerwalker(){
	var newWindow = window.open('http://kanae.com/pnp/homeworks/flowerwalker00.htm','flower','width=550,height=550,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}


function resume(){
	var newWindow = window.open('http://kanae.com/resume.htm','resume','width=750,height=screen.width,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function aboutK(){
	var newWindow = window.open('http://kanae.com/aboutK/statement.htm','aboutK','width=640,height=screen.width,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function wearable(){
	var newWindow = window.open('wearables/index.htm','wearable','width=900,height=700,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function dumbo(){
	var newWindow = window.open('dumbo/index.htm','dumbo','width=730,height=screen.width,top=0,left=0,resizable,scrollbars=yes,menubar=no,toolbar=no,location=no');
}

function cia(){
		var winl = (screen.width - 780) / 2;
			var wint = (screen.height - 600) / 2;
  var newWindow = window.open('http://kanae.com/citiwalk/convini1.swf','convini','height=504,width=780,top='+wint+',left='+winl+',scrollbars=no');
}

function video1(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/lk.htm','video','width=250,height=190,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function video2(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/tn.htm','video','width=250,height=190,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function video3(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/ts.htm','video','width=330,height=250,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function rm1(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/lk.rm','video','width=250,height=190,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function rm2(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/tn.rm','video','width=250,height=190,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function rm3(){
	var newWindow = window.open('http://kanae.com/aboutK/mov/ts.rm','video','width=330,height=250,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}
function catalogue(){
	var newWindow = window.open('http://filmclix.com/html/films/catalogue/catalogue.html','film','width=805,height=505,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function sidebyside(){
	var newWindow = window.open('http://uniquestandards.com/issue1/english/inter/sbys/sidebyside.html','sidebyside','width=805,height=605,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}

function billsteel(){
	var newWindow = window.open('billsteel/index.html','billsteel','width=700,height=610,top=0,left=0,resizable,scrollbars=no,menubar=no,toolbar=no,location=no');
}