/* General */
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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];}
}


/*Get Name*/
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;}}}return strReturn;
}

function getURL() {
	var file_name = document.location.href;
	var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	return file_name.substring(file_name.lastIndexOf("/")+1, file_name.lastIndexOf("."));
}

function getName() {
	var file_name = document.location.href;
    var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	return file_name.substring(file_name.lastIndexOf("/")+1, file_name.lastIndexOf("."));
}

function getLan() {
	var file_name = document.location.href;
    var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
	return file_name.substring(file_name.lastIndexOf("_")+1, file_name.lastIndexOf("."));
}
             
/*Windows Title*/
function windows_title(){
document.write("<title>Solarwell</title>");
}

/*Footer*/
function footer(){
document.write("<tr class='bg_footer'>");
document.write("<td height='50' align='center' valign='top' class='footer'>");
document.write("Copyright (c) <a href='index.html'>Solarwell</a> All rights reserved. Powered by <a href='http://www.communilink.net' target='_blank'>CommuniLink.Net</a>");
document.write("</td></tr>");
}

/*Picgen*/
function picGen(nopic){
document.write("<div style='width:530px;padding:20px 0 0 0;'>");

for (i=0; i<=nopic;i++){
document.write("<div style='padding:0 20px 30px 0;float:left;'>");
document.write("<div>Item no. "+productData[i]+"</div>");
document.write("<div style='border: solid #e1e1e3;border-width: 1px 3px 4px 1px;'><img src='products/"+getName()+"/"+productData[i]+".jpg' border='0'/></div>");
document.write("</div>");
}

document.write("</div>");
}


/*Menu*/
function menu(){
document.write("<a href='index.html'><img src='images/menu2.jpg' border='0' name='aboutus' alt='About Us'/></a><br>");
document.write("<img src='images/menu3.jpg' border='0'/><br>");
document.write("<a href='monocrystalline.html'><img src='images/menu4.jpg' border='0' name='monocrystalline' alt='Solar modules - Monocrystalline'/></a><br>");
document.write("<a href='polycrystalline.html'><img src='images/menu5.jpg' border='0' name='polycrystalline' alt='Solar modules - Polycrystalline'/></a><br>");
document.write("<a href='stonelamp.html'><img src='images/menu6.jpg' border='0' name='stonelamp' alt='Solar Stone Lamp'/></a><br>");
document.write("<a href='flashlight.html'><img src='images/menu7.jpg' border='0' name='flashlight' alt='Solar Flash Light'/></a><br>");
document.write("<a href='backpack.html'><img src='images/menu8.jpg' border='0' name='backpack' alt='Solar Backpack'/></a><br>");
document.write("<a href='news.html'><img src='images/menu9.jpg' border='0' name='news' alt='News'/></a><br>");
document.write("<a href='contactus.html'><img src='images/menu10.jpg' border='0' name='contactus' alt='Contact Us'/></a>");

document.aboutus.onmouseover=aboutus_over
document.aboutus.onmouseout=aboutus_out
function aboutus_out( ) {document.aboutus.src='images/menu2.jpg'}
function aboutus_over( ){document.aboutus.src='images/menu2_s.jpg'}

document.monocrystalline.onmouseover=monocrystalline_over
document.monocrystalline.onmouseout=monocrystalline_out
function monocrystalline_out( ) {document.monocrystalline.src='images/menu4.jpg'}
function monocrystalline_over( ){document.monocrystalline.src='images/menu4_s.jpg'}

document.polycrystalline.onmouseover=polycrystalline_over
document.polycrystalline.onmouseout=polycrystalline_out
function polycrystalline_out( ) {document.polycrystalline.src='images/menu5.jpg'}
function polycrystalline_over( ){document.polycrystalline.src='images/menu5_s.jpg'}

document.stonelamp.onmouseover=stonelamp_over
document.stonelamp.onmouseout=stonelamp_out
function stonelamp_out( ) {document.stonelamp.src='images/menu6.jpg'}
function stonelamp_over( ){document.stonelamp.src='images/menu6_s.jpg'}

document.flashlight.onmouseover=flashlight_over
document.flashlight.onmouseout=flashlight_out
function flashlight_out( ) {document.flashlight.src='images/menu7.jpg'}
function flashlight_over( ){document.flashlight.src='images/menu7_s.jpg'}

document.backpack.onmouseover=backpack_over
document.backpack.onmouseout=backpack_out
function backpack_out( ) {document.backpack.src='images/menu8.jpg'}
function backpack_over( ){document.backpack.src='images/menu8_s.jpg'}

document.news.onmouseover=news_over
document.news.onmouseout=news_out
function news_out( ) {document.news.src='images/menu9.jpg'}
function news_over( ){document.news.src='images/menu9_s.jpg'}

document.contactus.onmouseover=contactus_over
document.contactus.onmouseout=contactus_out
function contactus_out( ) {document.contactus.src='images/menu10.jpg'}
function contactus_over( ){document.contactus.src='images/menu10_s.jpg'}
}

/*Flash Banner*/
function banner(){
AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '790',
'height', '167',
'src', 'flash/banner',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'banner',
'bgcolor', '#ffffff',
'name', 'banner',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flash/banner',
'wmode','transparent',
'salign', ''
);
}