  
 
   
   
// loads file into an iframe

function loadFrame1(url){
 //alert("loading page " + url);
 document.getElementById('subpage_content_container').src = url;
//document.all.theIframe.src = url;
}




function loadFrame2(url){
 //alert("loading page " + url);
 document.getElementById('portfolio_iphone_iframe').src = url;
//document.all.theIframe.src = url;
}




function loadFrame3(url){
 //alert("loading page " + url);
 document.getElementById('portfolio_ipad_iframe').src = url;
//document.all.theIframe.src = url;
}



function loadFrame4(url){
 //alert("loading page " + url);
 document.getElementById('portfolio_iphone_iframe_horizontal').src = url;
//document.all.theIframe.src = url;
}



function loadFrame5(url){
 //alert("loading page " + url);
 document.getElementById('portfolio_ipad_iframe_horizontal').src = url;
//document.all.theIframe.src = url;
}






// loads next iframe on mouseover


function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}






// image rollover

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




// fade in page


function fadeInPageX(){
if (document.getElementById("fadeDiv").style.MozOpacity < 1){
document.getElementById("fadeDiv").style.MozOpacity = .1 + Math.abs(document.getElementById("fadeDiv").style.MozOpacity)
setTimeout("fadeInPage()",70);
}
else
document.getElementById('fadeDiv').style.visibility = "visible";
}





// fade in page 2


/* Fade-In Page script ©2008 John Davenport Scheuer
   As first seen in http://www.dynamicdrive.com/forums/
   username:jscheuer1 - This credit must remain for legal use.
   */

fadeInPage.speed=10; //Set speed of transition for non-IE, lower numbers are faster, 20 is the minimum safe value
fadeInPage.bg='#fff'; //Set backgroud style (color or color and image) of transition division for non-IE, should match page background or the predominant color of the page

///////////////// Stop Editing /////////////////

function fadeInPage(){
var el=document.getElementById("fadeDiv");
el.style[fadeInPage.prprt] = el.style[fadeInPage.prprt] == ''? 1 : el.style[fadeInPage.prprt];
if (el.style[fadeInPage.prprt] > 0){
el.style[fadeInPage.prprt] = el.style[fadeInPage.prprt] - 0.02;
setTimeout("fadeInPage()", fadeInPage.speed);
}
else {
el.style[fadeInPage.prprt] = 0;
if(document.removeChild)
el.parentNode.removeChild(el);
}
}
if(document.documentElement&&document.documentElement.style){
fadeInPage.d=document.documentElement, fadeInPage.t=function(o){return typeof fadeInPage.d.style[o]=='string'};
fadeInPage.prprt=fadeInPage.t('opacity')? 'opacity' : fadeInPage.t('MozOpacity')? 'MozOpacity' : fadeInPage.t('KhtmlOpacity')? 'KhtmlOpacity' : null;
}
fadeInPage.set=function(){
var prop=fadeInPage.prprt=='opacity'? 'opacity' : fadeInPage.prprt=='MozOpacity'? '-moz-opacity' : '-khtml-opacity';
document.write('\n<style type="text/css">\n#fadeDiv {\nheight:'+window.innerHeight+'px;display:block;position:fixed;'+
'z-index:10000;top:0;left:0;background:'+fadeInPage.bg+';width:100%;\n'+ prop +':1;\n}\n<\/style>\n');
}
if(window.addEventListener&&fadeInPage.prprt){
fadeInPage.set();
window.addEventListener('load', fadeInPage, false);
}












// contactus form


function InputActions(field,id) {
    var i=1;
	var lid="none";
	for (i=1;i<=100;i++) { 
	    lid='row'+i;
		lidsec='rowsec'+i;
		if (document.getElementById(lid) != null) {
		   if (lid==id) {
	              document.getElementById(lid).className='focus';
				  if (document.getElementById(lidsec) != null)
				     document.getElementById(lidsec).className='focus';
				  }
			else  {
			      document.getElementById(lid).className='';
				  if (document.getElementById(lidsec) != null)
				     document.getElementById(lidsec).className='';				  
				  }
		   }		   
	    }		
		
} 


