//window classfunction window_class(name,state,theobject){    this.win_name = name;    this.win_state = state;    this.win_object = theobject;        this.win_top = "";    this.win_left = "";    this.clip_height = "";    this.clip_width = "";    this.win_speed = "";        this.uri1 = "";    this.uri2 = "";    this.uri = "";        this.querystring = "";        //define methods    this.setwin_name = setwin_name;    this.setwin_state = setwin_state;      this.setwin_object = setwin_object;        this.setwin_top = setwin_top;    this.setwin_left = setwin_left;    this.setclip_height = setclip_height;    this.setclip_width = setclip_width;    this.setwin_speed = setwin_speed;        this.setquerystring = setquerystring;         this.seturi1 = seturi1;    this.seturi2 = seturi2;    this.builduri = builduri;          }function setwin_name(name){this.win_name = name;}function setwin_state(state){this.win_state = state; }function setwin_object(theobject){this.win_object = theobject;//alert(this.setwin_object);}function setwin_top(top){this.win_top = top;}function setwin_left(left){this.win_left = left;}function setclip_height(height){this.clip_height = height;}function setclip_width(width){this.clip_width = width;}function setwin_speed(speed){this.win_speed = speed;}function setquerystring(qstr){this.querystring = qstr;}function seturi1(uri1str){this.uri1 = uri1str; //alert(this.uri1);} function seturi2(uri2str){this.uri2 = uri2str; //alert(this.uri2);}function builduri(){this.uri = this.uri1+this.querystring+this.uri2;//alert("hey"+this.uri1+this.querystring+this.uri2); }  var hohh = Object();var hohh2 = Object();var hohh3 = Object();var hohh4 = Object();var hohh5 = Object();var hohh6 = Object();var temphohh = Object();window_obj_array = new Array;//first windowwindow_obj_array[0] = new window_class("first",0,hohh);window_obj_array[0].seturi1("http://images.google.com/images?q=");window_obj_array[0].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[0].setwin_top(-580);window_obj_array[0].setwin_left(-1);window_obj_array[0].setclip_height(820);window_obj_array[0].setclip_width(520);window_obj_array[0].setwin_speed(900);//second windowwindow_obj_array[1] = new window_class("second",0,hohh2);window_obj_array[1].seturi1("http://images.google.com/images?q=");window_obj_array[1].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[1].setwin_top(-580);window_obj_array[1].setwin_left(-1);window_obj_array[1].setclip_height(820);window_obj_array[1].setclip_width(520);window_obj_array[1].setwin_speed(1000);//third windowwindow_obj_array[2] = new window_class("third",0,hohh3);window_obj_array[2].seturi1("http://images.google.com/images?q=");window_obj_array[2].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[2].setwin_top(-580);window_obj_array[2].setwin_left(-1);window_obj_array[2].setclip_height(820);window_obj_array[2].setclip_width(520);window_obj_array[2].setwin_speed(1200);//fourth windowwindow_obj_array[3] = new window_class("forth",0,hohh4);window_obj_array[3].seturi1("http://images.google.com/images?q=");window_obj_array[3].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[3].setwin_top(-580);window_obj_array[3].setwin_left(-1);window_obj_array[3].setclip_height(820);window_obj_array[3].setclip_width(520);window_obj_array[3].setwin_speed(1000);//fifth windowwindow_obj_array[4] = new window_class("fifth",0,hohh5);window_obj_array[4].seturi1("http://images.google.com/images?q=");window_obj_array[4].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[4].setwin_top(-580);window_obj_array[4].setwin_left(-1);window_obj_array[4].setclip_height(820);window_obj_array[4].setclip_width(520);window_obj_array[4].setwin_speed(1200);//sixth windowwindow_obj_array[5] = new window_class("sixth",0,hohh6);window_obj_array[5].seturi1("http://images.google.com/images?q=");window_obj_array[5].seturi2("&ie=ISO-8859-1&hl=en");window_obj_array[5].setwin_top(-580);window_obj_array[5].setwin_left(-1);window_obj_array[5].setclip_height(820);window_obj_array[5].setclip_width(520);window_obj_array[5].setwin_speed(900);function createwindow(index){	var x,y;	x=Math.round(600*Math.random());	y=Math.round(800*Math.random());	temphohh=window.open('empty_new.html',window_obj_array[index].win_name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=112,height=112,top='+x+',left='+y+';')          window_obj_array[index].setwin_object(temphohh);	window_obj_array[index].win_state = 1;}function controllerx(str,index){//alert(window_obj_array[index].win_state + " " + index);	if (window_obj_array[index].win_state == 0){				createwindow(index);		pass_it(str,index);		create_doc(index);		}    else{		pass_it(str,index);		create_doc(index);		}}function pass_it(str,index){ this.str = str;        str=str+" ";        var str2="";        //alert("input string = "+str);        len=str.length;        pos=0;        k=-1;        j=0;                while (pos!=-1)        {        pos=str.indexOf(" ",k+1)        subStr=str.substring(j,pos);        str2+=subStr+="+";        k=pos;        j=+pos+1;        }        window_obj_array[index].setquerystring(str2.substring(0,len-1));        //alert("output string = "+str3);}function create_doc(index){                window_obj_array[index].builduri();//alert(window_obj_array[index].uri+" "+"shhhhh");//alert(window_obj_array[index].win_object);window_obj_array[index].win_object.document.writeln("<html>");window_obj_array[index].win_object.document.writeln("<head>");window_obj_array[index].win_object.document.writeln("<style type='text/css'>");window_obj_array[index].win_object.document.writeln("#dudivdu {position: absolute; top:"+window_obj_array[index].win_top+"px; left:"+window_obj_array[index].win_left+"px;};")window_obj_array[index].win_object.document.writeln("</style>");window_obj_array[index].win_object.document.writeln("</head>");window_obj_array[index].win_object.document.writeln("<body bgcolor='black' onunload='opener.transmit_winstate("+index+");' onLoad='setInterval(\"opener.ownmove("+index+")\","+window_obj_array[index].win_speed+");'>");window_obj_array[index].win_object.document.writeln("<layer  name='nn1' z-index='1'></layer>");window_obj_array[index].win_object.document.writeln("<layer src="+window_obj_array[index].uri+" name='nn' z-index='2' top="+window_obj_array[index].win_top+" left="+window_obj_array[index].win_left+"></layer>");window_obj_array[index].win_object.document.writeln("<div id='dudivdu'>");window_obj_array[index].win_object.document.writeln("<IFRAME src="+window_obj_array[index].uri+" name='nnie' scrolling='no' marginwith='0' height="+window_obj_array[index].clip_height+" width="+window_obj_array[index].clip_width+"  marginheight='0' frameborder='No'></IFRAME>");window_obj_array[index].win_object.document.writeln("</div>");window_obj_array[index].win_object.document.writeln("</body>");window_obj_array[index].win_object.document.writeln("</html>");window_obj_array[index].win_object.document.close();window_obj_array[index].win_object.focus();}//opener window is calling function, but is moving the small windowfunction ownmove(index){var x,y; x=Math.round(600*Math.random());y=Math.round(800*Math.random());window_obj_array[index].win_object.moveTo(x,y);}//if window is closed, state stays 0function transmit_winstate(index){window_obj_array[index].setwin_state(0);}
